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?

  • 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
    May 23, 2018 at 13:04
  • 1
    You could also disable Ctrl+Q system-wide: askubuntu.com/questions/1919/…
    – caw
    May 31, 2018 at 22:12
  • 2
    As of Firefox 87 (March 2021), you can finally disable the Ctrl+Q shortcut, by going to about:config and setting browser.quitShortcut.disabled to true. Note that this will only apply after restarting the broswer. Thanks to @evilpie who contributed that solution to this answer!
    – waldyrious
    Sep 8, 2021 at 16:00
  • Ah, but that does not disable Ctrl+Shift+Q. Q being right next to TAB :'( Jun 3, 2022 at 18:34
  • 1
    For me (Firefox 113) browser.quitShortcut.disabled worked, but only took effect after restarting Firefox. There is also browser.warnOnQuitShortcut, which seems to take effect immediately.
    – EM0
    May 24 at 19:19

6 Answers 6


Firefox offers no built-in editor for key bindings.

A solution exists to disable the shortcut starting with version Firefox 87, as given in the comments above by waldyrious. Thanks to Firefox developer Tom Schuster (user evilpie) and the patch to the 20 year-old bugzilla we have the updated answer on superuser, reproduced here:

In about:config set the preference

browser.quitShortcut.disabled true

and restart the browser for it to take effect.

  • 3
    keybinder appears to be a successor to the discontinued Customizable Shortcuts: addons.mozilla.org/firefox/addon/keybinder
    – Dror S.
    Aug 2, 2016 at 9:29
  • 3
    Check that: Keybinder will stop working permanently as of Firefox 57 per a note posted to the front page of the official repository. Aug 30, 2017 at 1:34
  • 6
    Do you know of a solution for FF >= 57?
    – kralyk
    Nov 16, 2017 at 13:17
  • 1
    Any solutions nor 2018? Customizable Shortcuts is disappeared.
    – ZK Zhao
    May 21, 2018 at 12:40
  • 1
    The described solution works in FF 92. After setting the option you can use ctrl+q to stop the browser and once it starts again it should be fine :) Jul 29, 2022 at 19:41

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
  • 4
    It does not work when you use the feature "Show my windows and tabs from last time" - source bugzilla
    – user875397
    Feb 22, 2018 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) Apr 21, 2018 at 2:12

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, 2016 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, 2016 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, 2016 at 8:51

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, 2017 at 21:05

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.


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .