https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands says the following: > If a key combination is already used by the browser (for example, "Ctrl+Shift+R"), or by an existing add-on, then you can't override it. You will be allowed to define it, but your event handler will not be called when the user enters it. This appears to not be true in Firefox. I don't see any logic that checks whether the shortcut is already registered at http://searchfox.org/mozilla-central/source/browser/components/extensions/ext-commands.js Moreover, I created an add-on that successfully blocks the default actions of the Ctrl-Q and Command-Q shortcuts (which normally cause Firefox to quit) by registering Ctrl+Q/MacCtrl+Q and Command+Q in manifest.json: https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-and-cmd-q/ Can you confirm that this is the expected behavior, and if so, update the documentation?
I just removed that paragraph based on your add-on. I think we should probably think about if we want to have a permission for overriding built-in commands, so altered the bug title accordingly.
I think simply overriding is always a bad idea, even if there is a permission. Firefox should finally get a proper UI for configuring keyboard shortcuts where conflicts are visible and resolvable in a clever way.
+1 for a better UI. Follow bug 1287093 for it.
I believe that with a proper UI (or API), it should be possible to allow WebExtensions to override the shortcut. So I'm adding bug 1240350 and bug 1320332 as dependencies.
Bug 1303384 is about providing a UI for re-assigning command shortcuts. Probably the only thing this adds to that bug is showing the built in commands so you can see when a shortcut is overriding a build in shortcut.
Adjusted summary to more accurately reflect the purpose of the bug.
Ctrl-Q cannot be overridden on Linux - https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-and-cmd-q/reviews/854938/ This behavior is inconsistent across platforms :(