Linux – How to disable Ctrl+Q shortcut in Firefox on Linux

firefoxkeyboard shortcutslinuxubuntu-unity

Since Firefox 57 there is no way to disable Ctrl+Q shortcut by plugin on Linux (see this bug). All workarounds I've found are based on setting the global Ctrl+Q shortcut to "steal" it from Firefox. But this will disable this shortcut in every application, and I want to disable this shortcut only in Firefox, without affecting any other app.

Is there a way to disable or catch shortcut only for one application? I'm using Ubuntu with Unity.

Best Answer

In about:config set preferences.

Firefox >= 87

browser.quitShortcut.disabled true

Firefox >= 65

browser.sessionstore.warnOnQuit true
browser.warnOnQuit true

enter image description here


Older Firefox

browser.showQuitWarning true
browser.warnOnQuit true

Tested in all version I've come across 61.0.2-64.0.2 on 64bit Linux (and the 60esr channel on Win10). screenshot