To keep malicious web sites from abusing this, only web sites you have interacted with can show a warning before you close them. So, to disable CTRL+Q, you'll have to click this button:
For quite some time now, I've been getting a browser-issued confirmation dialog with the following settings:
browser.sessionstore.warnOnQuit
enabled (true)browser.warnOnQuit
enabled (true)browser.abs.warnOnClose
enabled (true)browser.startup.homepage
set to "3" (equivalent to checking "Restore previous session" in preferences)
Also, Firefox 87 will introduce a browser.quitShortcut.disabled
setting, which will hopefully make this site obsolete for good.
Unfortunately, as of 2018-11-07, there does not seem to be an easy way to keep CTRL+Q from closing Firefox without warning under Linux, and most of the workarounds are unreliable or only work in certain circumstances. The corresponding bug has been locked to prevent further comments, and then ignored for 4+ months, so it doesn't seem likely that this will be fixed soon. Unlike in Chrome, I shall add (thank you, Chrome team!).
As a consequence, every time you accidentally hit CTRL+Q, Firefox closes and you have to re-open it, wait for tabs to restore (and log in again everywhere if you discard cookies on exit).
So I made this site. It can't completely disable the shortcut, but it will trigger a confirmation dialog so you can keep it from closing your entire browser. And hopefully motivate a Firefox developer into addressing this before the heat death of the universe. If this gets popular, maybe I'll add a global counter?
Yes.