20

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?

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.

  • 3
    keybinder appears to be a successor to the discontinued Customizable Shortcuts: addons.mozilla.org/firefox/addon/keybinder – Dror S. Aug 2 '16 at 9:29
  • Keybinder works for me as well. – Damian Yerrick Dec 25 '16 at 21:33
  • 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 Aug 30 '17 at 1:34
  • 3
    Do you know of a solution for FF >= 57? – kralyk Nov 16 '17 at 13:17
  • Any solutions nor 2018? Customizable Shortcuts is disappeared. – cqcn1991 May 21 '18 at 12:40
6

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
  • 2
    It does not work when you use the feature "Show my windows and tabs from last time" - source bugzilla – user875397 Feb 22 '18 at 16:48
  • 1
    This solution is the only one that actually works for the latest Firefox Quantum (suggested extensions are not compatible or are discontinued) – Hamman Samuel Apr 21 '18 at 2:12
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.

  • 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. Jun 27 '16 at 8:11
  • 1
    I'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. Jun 27 '16 at 9:01
  • 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. Jun 28 '16 at 8:51
1

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.

  • This blocks ctl-Q, but doesn't provide an alternative. – Adam Mar 22 '17 at 21:05
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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.