How to disable Ctrl + Shift + C shortcut in Firefox? [closed]
Asked Answered
A

6

26

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?

Allheal answered 15/3, 2016 at 9:24 Comment(2)
"customizable shortcuts" extension - This add-on has been removed by its author.Isometropia
@Allheal could you check the new answers?Hosiery
B
6

Install Menu Wizard, click on Keyboard shortcuts, find key_inspector, delete the shortcut.

Install details here

Baby answered 15/3, 2016 at 9:46 Comment(6)
Nice! You can also configure copy to be Ctrl+shift+C, and then both modes work.Sanborn
Not compatible with Firefox QuantumIsometropia
This is infuriating that one cannot just natively modify these in firefoxJohnnajohnnie
Not compatible with my version of Firefox. On Ubuntu 16.04.Rolandorolandson
Yes, extensions don't really have the power they used to on the old Firefox architecture. If you're willing to build ff from source, the shortcut can be disabled from there. See my answer below for more details.Immunology
Works in Waterfox. 👍Halve
I
5

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/

Immunology answered 18/1, 2019 at 20:23 Comment(0)
H
4

An addon (source code repository) 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 (Mozilla Public License 2.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);
Hosiery answered 4/2, 2021 at 17:42 Comment(0)
W
2

You can't. Unfortunately, even if you disable them in the about:config it doesn't actually disable them.

There may be plugins that do it but on vanilla firefox it is not possible.

Witkowski answered 15/3, 2016 at 9:32 Comment(0)
I
1

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

Isometropia answered 29/5, 2021 at 16:32 Comment(2)
Works insofar the console no longer opens. Instead a new tab is opened informing to "Enable Firefox Developer Tools" for this shortkey. But at least this tab can be closed with "ctrl + w" - which doesn't require clicking it with the mouse. Really wish you wouldn't need to build firefox from source to disable a shortkey.Underbrush
The devtools.enabled preference doesn't exist by default, confirmed for Firefox 105 in new a Fedora 36 VM.Hosiery
S
-1

This firefox addon works for me.
It disables shortcut only (not devtools entirely) and makes it function as Ctrl+c

Stiver answered 11/12, 2023 at 11:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.