MozillaZine

Can I delete (or modify or supplant) the alt+f4 shortcut?

Discuss various technical topics not related to Mozilla.
Odin2
 
Posts: 499
Joined: March 10th, 2012, 8:08 pm

Post Posted January 4th, 2019, 11:15 am

I use an add-on to access my toolbar bookmarks by alt+, according to position, and often use alt+4. The problem is that I sometimes hit alt+f4 in error--and close Fx.This could be solved if I could inactivate the alt+f4 shortcut, or alternatively if I could supplant it to cause a less problematic action--or if I could modify it to require confirmation. Is any of these possible?

DanRaisch
Moderator

User avatar
 
Posts: 121116
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 4th, 2019, 1:17 pm

Moving to MozillaZine Tech as this is not a Firefox Support issue but either OS or add-on related.


morat
 
Posts: 3106
Joined: February 3rd, 2009, 6:29 pm

Post Posted January 5th, 2019, 8:46 am

You can use the keyconfig extension to disable Alt+F4 in Thunderbird 60.

http://addons.thunderbird.net/thunderbird/addon/602486

Unfortunately, the keyconfig extension isn't compatible with Firefox Quantum.

jscher2000

User avatar
 
Posts: 10442
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted January 7th, 2019, 4:01 pm

I have created an experimental extension that keeps a window open when you try to close it. If you want to test it out:

https://addons.mozilla.org/firefox/addon/prevent-closing-window/

It uses the (usually) annoying "do you want to leave the page" prompt to do this, so you can't disable that feature.

Right now, it only protects 1 regular window and 1 private window. If I get time, I'll add more options.

Odin2
 
Posts: 499
Joined: March 10th, 2012, 8:08 pm

Post Posted January 7th, 2019, 4:53 pm

Jefferson, this extension is just what I want--except that it's not working for me. I've followed your instructions, made sure the about:config preferences were as you stipulated, pinned the Keep Open tab, and restarted Fx--but alt+f4 closed Fx as usual, without any warning or prompt.

jscher2000

User avatar
 
Posts: 10442
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted January 7th, 2019, 5:28 pm

Odin2 wrote:I've followed your instructions, made sure the about:config preferences were as you stipulated, pinned the Keep Open tab, and restarted Fx--but alt+f4 closed Fx as usual, without any warning or prompt.


What is the "restarted Fx" step?

I'm actually having a completely different problem in a new profile: when I "Leave page" Firefox stays in memory and doesn't exit properly. Something I need to solve so Firefox can exit.

Odin2
 
Posts: 499
Joined: March 10th, 2012, 8:08 pm

Post Posted January 7th, 2019, 7:50 pm

After executing the add-on I clicked "Restart normally" at about:profiles. In retrospect that should have been unnecessary since I had not changed any configurations (?). But it seems you're saying that the add-on's operation is imperfect anyway. I'll try again if/when you say so.

jscher2000

User avatar
 
Posts: 10442
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted January 7th, 2019, 9:05 pm

I changed the extension so that page unpins itself before exit. Otherwise, it is restored as sort of an inert/broken tab. So that part should work better now.

Even so, when exiting, it's safest to click "Stay on Page" and "Close This Tab" rather than selecting "Leave Page" at shutdown. Otherwise the shutdown sometimes seems to stall. I need to get some expert advice on why that's happening because it definitely isn't obvious to me.

Odin2
 
Posts: 499
Joined: March 10th, 2012, 8:08 pm

Post Posted January 8th, 2019, 12:31 pm

Just great, Jefferson!

Apparently the instruction to pin the tab is for the user's convenience, so it will always be available. I am not willing to pin it, as doing so makes it identifiable only by Fx's generic globe icon, which I use elsewhere. If I ever lose my tabs, I will just restore this.

jscher2000

User avatar
 
Posts: 10442
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted January 8th, 2019, 2:45 pm

Oh, does it work without pinning? I thought I was adding the "beforeunload" listener when you pinned. I will need to make that optional? And fix the icon...

Odin2
 
Posts: 499
Joined: March 10th, 2012, 8:08 pm

Post Posted January 8th, 2019, 7:00 pm

Yes, it has worked just fine without being pinned. And a non-generic icon would indeed be welcom.

Return to MozillaZine Tech


Who is online

Users browsing this forum: No registered users and 3 guests