How to disable Ctrl + Shift + C shortcut in Firefox?

Viewed 4975

Pressing Ctrl+Shift+C in Firefox opens the developer tools and activates the "Pick element" tool.

I often mistakenly use this shortcut when I want to copy something (mixing it up with the shortcut to copy text in terminals).

It's really annoying since

  • it doesn't copy the text
  • it opens the developer tools
  • I can't even close the developer tools by using this shortcut again, I need to reach for the mouse to close it

One solution appeared to be the Firefox "customizable shortcuts" extensions, but it has been discontinued.

Any other idea?

5 Answers

Seeing how Firefox's architecture has seen an overhaul during the transition to Quantum and WebExtensions, it is no longer possible to disable built in shortcuts using an extension like "Menu Wizard" or "customizable shortcuts".

If you know how to compile firefox from source, you can still do it by modifying the source code. Download the source, extract it and edit:

path-to-ff-source-dir/devtools/startup/locales/en-US/key-shortcuts.properties

and change

inspector.commandkey=C

to

inspector.commandkey=VK_F1

If you are not familiar with how to build firefox from source, you can follow the instructions outlined here.

The source code for the latest firefox can be found here:

https://archive.mozilla.org/pub/firefox/releases/ (don't leave out the / at the end or it will give you a 404 error).

Just pick a release (64.02 for example) and click on source:

https://archive.mozilla.org/pub/firefox/releases/64.0.2/source/

only whole devtools is possible to disable:

go to about:config page, accept warning, search for:

devtools.enabled

change value true to false

close the config page

An addon has been released to remap Ctrl+Shift+C to Ctrl+C. May also work as a userscript:

If you use Greasemonkey, Tampermonkey, Violentmonkey, or FireMonkey, you also could consider using the above file [content.js] in a user script.

description:

Injects a script into pages to intercept Ctrl+Shift+C as a copy command, not allowing it to open Developer Tools.

Concerned about permissions? There is no convenient way at the moment to have Firefox run this extension on every site without "all sites" permission. However, you can look at what the script does, it's minimal. https://github.com/jscher2000/Ctrl-Shift-C-Should-Copy/blob/main/content.js


The content.js code for v0.1.0:

document.body.addEventListener('keydown', function(evt){
    if (evt.ctrlKey && evt.shiftKey && evt.key == "C"){
        // Copy the selection to the clipboard
        document.execCommand('copy');
        // Throw away this event and don't do the default stuff
        evt.stopPropagation();
        evt.preventDefault();
    }
}, false);

/* Intercept and check keyup events for Ctrl+Shift+C */

document.body.addEventListener('keyup', function(evt){
    if (evt.ctrlKey && evt.shiftKey && evt.key == "C"){
        // Throw away this event and don't do the default stuff
        evt.stopPropagation();
        evt.preventDefault();
    }
}, false);
Related