tl/dr: assign a global shortcut to Ctrl-Q
In Firefox Quantum, the about:config
settings that used to warn against Firefox closures via an accidental Ctrl-Q keypress no longer work.
Workaround: on Arch Linux | XFCE desktop environment (other Linux distros &/or desktops may allow a similar approach):
Whiskers menu >> All Settings >> Keyboard >> Application Shortcuts >> Add
Add a new "application", null
; assign it to the Ctrl-Q
keypress
- Update (comment by @justderb): "Using 'true' instead of 'null' is nice if you don't want the error window to pop up."

Invocation: here, I pressed Ctrl-Q
in Firefox Quantum v. 60.0.1 (64-bit); instead of quitting Firefox, I get this popup,

Caveat: this, of course, globally affects all Ctrl-Q keypresses. However, -- per my own preference -- that shortcoming is outweighed by nullifying those accidental Firefox Ctrl-Q closures (after which I must re-login into websites: GitHub; reddit; ...).
Update 1
@crazypyro 's answer also works for me (FF Quantum 63.0 on x86_64 Linux) giving a popup warning if you try to Quit Firefox. That should be probably regarded as the specific answer, with my solution as a more general workaround.
about:config
(both of the following set to true
):
browser.showQuitWarning
browser.warnOnQuit
Update 2 [2020-03-01]
For some time in Vim I've encountered the occasional and frustrating issue where the terminal "freezes" and I lose keystroke control of Vim (requiring me to kill/restart Vim).
After some investigating, it turns out the issue is Software Flow Control (XON/XOFF flow control). Ctrl-s
freezes the terminal until Ctrl-q
is pressed -- which, per my solution presented above, is globally remapped to "dummy application" true
.
The workaround to this issue is to add the lines
# enable Ctrl-s and Ctrl-q:
stty -ixon
near the top of your ~/.bashrc
, then open a new terminal and start Vim.
Relevant links/discussion: