How to change Mozilla Firefox quit shortcut?

20

2

I'm using Mozilla Firefox for Ubuntu(version - 39.0) I want to change the quit short-cut which is currently Ctrl+Q.. To some other keys, because sometime while closing tabs with Ctrl+W., I accidentally close my firefox.

How can I change it in my system? Is there any way to do it?

Kunal

Posted 2015-07-21T06:12:05.070

Reputation: 1 769

I might be missing something, but I just tested every combination of browser.tabs.warnOnClose, browser.warnOnQuit and browser.showQuitWarning, and still no dialog showed up when closing a window with multiple tabs, either by clicking the close button or by hitting Ctrl+Q. I'm using Firefox 60.0.1 on Ubuntu 16.04 LTS. So I guess there's not much one can do apart from using extensions...

– waldyrious – 2018-05-23T13:04:30.157

1

You could also disable Ctrl+Q system-wide: https://askubuntu.com/questions/1919/how-can-i-disable-ctrlq-for-all-applications-system-wide

– caw – 2018-05-31T22:12:03.537

Answers

6

Firefox offers no built-in editor for key bindings.

I have successfully used the Customizable Shortcuts extension which allows you to disable Ctrl+Q

Keybinder is based on the (discontinued) Customizable Shortcuts add-on by Tim Taubert.

meuh

Posted 2015-07-21T06:12:05.070

Reputation: 4 273

3keybinder appears to be a successor to the discontinued Customizable Shortcuts: https://addons.mozilla.org/firefox/addon/keybinder/ – Dror S. – 2016-08-02T09:29:40.543

Keybinder works for me as well. – Damian Yerrick – 2016-12-25T21:33:10.643

3

Check that: Keybinder will stop working permanently as of Firefox 57 per a note posted to the front page of the official repository.

– Damian Yerrick – 2017-08-30T01:34:19.930

5Do you know of a solution for FF >= 57? – kralyk – 2017-11-16T13:17:07.287

Any solutions nor 2018? Customizable Shortcuts is disappeared. – cqcn1991 – 2018-05-21T12:40:22.740

5

To disable the shortcut without installing extensions:

  1. Type about:config in the address bar
  2. Type browser.showQuitWarning in the search field
  3. Change the value to true

Matthew

Posted 2015-07-21T06:12:05.070

Reputation: 966

3

It does not work when you use the feature "Show my windows and tabs from last time" - source bugzilla

– None – 2018-02-22T16:48:06.530

1This solution is the only one that actually works for the latest Firefox Quantum (suggested extensions are not compatible or are discontinued) – Hamman Samuel – 2018-04-21T02:12:13.657

4

Firefox does not allow changing shortcut keys out of the box (not even in About:config).

As far as I know, you have two options:

  • For only disabling ctrl+q, you can use the very simple Disable ctrl-q extension.

  • For customizing other shortcuts, including ctrl+q, you can install Menu Wizard. To use it, access Tools->Menu Wizard and click the keyboard icon on the top right (in LTR layout) to display the list of shortcuts and select a new one.

Note: the Customizable Shortcuts extension mentioned in the previous answer was discontinued and removed by its author (although the source code can still be found on github). Edit 2016-08-02: the add-on keybinder seems to be a successor to Customizable Shortcuts, although I haven't tried it personally.

Dror S.

Posted 2015-07-21T06:12:05.070

Reputation: 141

I tried Ctrl+Q and Alt+F4 for File->Exit in Menu Wizard. But FF ignores these shortcuts and does not quit. I tried Key Binder, but this add-on does not show Quit or Exit in its shorcut list.

– Aleksey F. – 2016-06-27T08:11:32.337

1I'm slightly confused by this statement - those shortcuts are Firefox's default, and this questions was discussing how to disable them. You don't need to do anything to enable them, AFAIK... – Dror S. – 2016-06-27T09:01:28.057

The "Exit" action is really absent in FF 47.0. When I sent a screenshot, Gregorio Litenstein, the developer of Keybinder, pointed me out to this add-on. Only after installing it, the "Exit" action appears in the "Other" category of Keybinder.

– Aleksey F. – 2016-06-28T08:51:19.497

2

I use Xubuntu, but plain Ubuntu probably has a similar function. Because Firefox itself does not allow to change the Ctrl-Q shortcut, I decided to steal that key combination away from Firefox.

The system gets keystrokes before applications do, so I used the Settings/Keyboard/Application shortcuts to define Ctrl-Q to start some non obtrusive application. I chose the Whisker application menu, but pick whatever. And look: even when Firefox has focus, Ctrl-Q does not reach it.

db-inf

Posted 2015-07-21T06:12:05.070

Reputation: 39

This blocks ctl-Q, but doesn't provide an alternative. – Adam – 2017-03-22T21:05:32.990

1

On Linux with Firefox Quantum, there is currently a bug that prevents extensions and explicit configuration from changing a builtin shortcut such as ctrl-Q. A workaround is to block it at the system level by e.g. installing the script from https://github.com/sasawat/firefox-ctrl-q-workaround and assigning it as the action of ctrl-Q as a global shortcut.

JanKanis

Posted 2015-07-21T06:12:05.070

Reputation: 139

0

In the electrolysis era I have come to rely on menu wizard to modify existing firefox hotkeys. It is a bit overkill since it also changes menu items, but seems to work well and is compatible.

groceryheist

Posted 2015-07-21T06:12:05.070

Reputation: 146