Shared publicly  - 
 
This worked for +Dirk Hohndel, maybe it can work for me too: "Dear LazyWeb, is there a way to disable the F12 key in chrome?"

Sure, I can work around it outside of chrome (I just made a desktop shortcut that takes over F12 and turns it into a no-op), but it's annoying.

The F12 key is right above the backspace key on my keyboard, clearly I'm totally spastic and uncontrolled, because when I type (into edit boxes like this) I hit it way too often and bring up the "developer console". After which I randomly start editing the gmail or G+ source code, which usually just ends up killing whatever pithy reply I was editing.

No, "Just be less spastic, Linus" is not the solution.
361
31
Warren Seymour's profile photoHenrik Andersen's profile photoLeopold Sutton's profile photoSailesh Agrawal's profile photo
192 comments
 
you can super-glue the key so it won't press down anymore. :D
 
Curious, I just hit F12. I don't have this problem on my Avante Stellar Keyboard, but I can see where that would be a prolblem.
 
A piece of eraser under the key so it becomes too stiff to press by accident.
 
There isn't a mechanism for editing our keyboard shortcuts within Chrome, sorry (some people use external software to do this - e.g. AutoHotKey on Windows).
 
Download the source code, remove the shortcut, compile and you're done. If you're really cool you'll fork it and upload for all the other spastic people out there!
 
useing google chrome on a debian based system i don't have that problem it is shift+ctrl+i so try switching versions of chrome
 
i can find nothing if not irony in the fact that +Linus Torvalds is trying to disable a mechanism to see source code :p
 
A keyboard with better separation comes to mind, I have three I use regularly, and they all have at least 1/4in separation. Using a laptop or separate keyboard? I have kb on my lap and arms on armrests, so my aim is better shooting at keys from benchrest.
 
Try Opera's backspace taking you back a page when you just want to backspace a few characters... at least Opera's keys can be changed...
 
Heck my Chromebook does not have any Function keys.. :-)
 
+Robert Main: I do realize the funny irony, but seriously, I'm perfectly happy with ctrl-shift-I: I have yet to hit something like that accidentally in the browser.

It's just the easily destructive nature of F12 I have problems with (F11 doesn't result in the same kind of chaos when you hit it and then hit other keys).

Anyway, as already mentioned, I can work around it with the window manager keybindings hack - so I don't need to recompile chrome. But it feels like an odd mis-design, and I don't see why that kind of key is on by default..
 
I'd think this'd be a fairly straightforward Extension to write ... do you grok Javascript, Linus?
 
what annoys me about the chrome developer console is that when you're trying to edit a peice of HTML/CSS in it you cant copy and paste into it and if you press Ctrl to do Ctrl + C/Ctrl + V it comes out of edit mode for that element
 
Does it need to be a cross-platform solution or would a Linux kernel patch do the trick?
 
You could cut a strip of metal from the side of a used (and washed) tuna can and bend it into a little protective roof for the f12 key.
 
Affix a small adhesive velcro patch to the F12 key. The tactile feedback should be sufficient for you to avoid pressing this key inadvertently.
 
I think it's time for electric shock therapy. A nice 12V arc from a car battery or two a couple times over will help you keep from hitting that F12 key. Muahahaha. Oh yeah, I don't use chrome, so it doesn't effect me as much.
Ada M
+
2
3
2
 
Remove the F12 key with a flat headed screwdriver? BTW, thank you for Linux.
 
it does not go with the theme but e had many problems with the wireless network is the fact that I use a netbook and I do not detect it when you first install the operating system is there any way for me to install detected without Necid parcel
 
+Dan Bunyard the way the world works as soon as you do that you find you need F12 for just about everything
WL Wong
 
I am a CS graduate and I don't think I have ever mis-hit F12 in my life using a desktop, laptop, netbook or any other keyboards. I type at 90+ WPM too.
 
+Linus Torvalds hmmm ... You are Linus Torvalds. That's as much near-God-like VIP status a spastic nerd could ever hope to get. :-) Can't you simply write a quick note to those Chrome devs and simply ask them to adjust the browser's behaviour? They might just as well do it, simply because you asked. (I definitely would ... <G>)
 
If you can affect the GMail/G+ source code with a single key, you are all powerful.
Translate
 
Linus! För att vara helt ärlig. Du utvecklade kärnan till Gnu/linux men du lyckas inte hålla fingret borta från F12 när du skriver något i en textbox i chrome? Köp ett nytt tangentbord, till exempel ett logitech G15. Där är avståndet så pass stort att du måste vara gravt handikappad för att träffa F12 istället för backspace.
Ps. älskar vad du gjort för världen, kudos för det, men håll fingrarna i styr ;-)
Edit: Jag kom precis på att du troligtvis talar om ett laptoptangentbord och inte ett "externt" tangentbord. Har ingen riktig lösning till det annat än att du kan ha ett fold-up tangentbord med dig :p
Translate
 
I was having this problem with the F11 key in Firefox, until I found the keyconfig extension. Maybe there's something similar for Chrome? Or maybe you can come back to Foxkeh?
 
+sergio benitez , I can help you with your problem (I've had many problems of that sort myself, and I've helped many people with their problems, with success). I followed you, so if you follow me back, it's possible to have a private chat.
 
Get in the habit of always hitting backspace an even number of times. :)
 
I had the same problem, but taking off the boxing gloves solved it ;-)
 
I used to go by "typeswithfists". Can you just remap it externally to backspace?
 
+elgarüx BrouSonoR That's mighty strange - it works for me! Are you sure you didn't try it on a page that was opened before you installed the extension?

edit: You're right, if the dev console is set to open in a new window it doesn't work, only if it's attached. Will have to look into that, no idea why it would be different.
edit2: Actually it seems to work either way for me now. I'm confused. It should work and at the moment it seems to be working so I don't know what happened.
edit3: It seems that when you open the developer console with the regular shortcut it will work with F12 as well, but not normally. :)
 
+Justin Wheeler Pretty sure the convention is .Xmodmap with a capital X, otherwise that's what I would use as well :)
Adding xmodmap ~/.Xmodmap to the .xinitrc is a good idea, too.
 
+Anders Mårtensson sure, i've killed all chrome instances before... it's always the same...
I've a fresh install V15.0.874.121 (Build officiel 109964), without extensions, only your "F12"
but thank you anyway, i'm sure you'll succeed ;)
(it's 4:28 for me, i go to bed)
And +Linus Torvalds, drag your Chrome to Trash ! :p
 
+elgarüx BrouSonoR Could you check if the content script is injected properly? Bring up the developer console (ah the irony), go to scripts and look for it in the list of scripts. It works perfectly for me with Chrome 17.0.942.0 on Windows Vista and Chromium 15.0.874.121 (same as yours) on Linux. I see no reason why it wouldn't work.
PS. thanks for the testing/feedback :)
 
Oxycontin could slow you down and take away the pain.
 
get a twiddler chording keyboard
 
Heh, there is no F<anything> key on my keyboard.

Perhaps time to switch to a Chromebook, Linus? ;-)
 
Get a machine where the function keys are not the primary function of the key. Instead, you need to press fn + f(1-12) to use it as a function key. They are mapped to volume up or volume down or something else instead. This might get annoying for a linux user who might be switching between ttys though.
 
I believe most Dells operate this way now (at least the last one I looked at did).
 
Happy Hacking Lite 2 Keyboard. Works like a champ.
 
f12 is my favorite way to instantly looks smarter to people around me. "Oh, I'll just hack around..."
 
I find that the easy way to disable any given key singularly is to simply use a screwdriver and place it below the forward edge of the key in question, then pry with the screwdriver gently so as to not mar the surface or edge of either of the two possible keys.
 
UI design has been going downhill steadily for about 2 years now, especially a majority of Google's products. (Arguably the one exception for the most part has been Google+.) IMHO, there's just wayyyy too much "because we can" mentality in the whole UI interaction (fading, sliding...useless eye candy crap like that), often at the expense of functionality. Analagous to your wandering fingers, if my pointer happens to wander over something, it shouldn't start obscuring content. Ever notice how the Web is the only medium which has somehow found this perfectly acceptable to do? Most other apps require a click. Thankfully, most of (but not all of) Google does require a click for UI visual changes.
 
Change the keyboard driver :P
 
Switch to Firefox? :)
 
Hmm? Use Chromium instead? I have F12 bound to Tilda console and I must have hit is about a dozen times today to open my terminal while in Chromium. I didn't even know it was suppose to do anything in Chrome.

Just tried it in Chrome on my Windows computer and I see what you mean. You are not using Windows are you?
 
Hmm, F12 opens guake for me, never noticed anything in chrome.
 
Thats also true for me. F12 opens up guake - maybe gnome hotkeys are "global"?
 
Just remap "Backspace" to "Delete" and use it instead ;)
 
+Anders Mårtensson Yea, I am too tired to really read tonight. However, it does beg the question on why you said "The WM key bindings supercede the Chrome ones, obviously."
 
+Andrew Rugman Well, in the US is might be considered offensive to say you smoke fags. Especially if you are Eminem.
 
+John C. Reid Because they do. Supersede might not have been the best of terms to use, but I hope the meaning that the WM key bindings take precedence over the Chrome ones was conveyed anyway.
 
Somehow I always hit that stupid key and its out of my way to even hit it!
 
just imagined +Linus Torvalds typing and NOT looking at the screen. Now, that explains lots of things. :)

Hell, I'm going to bookmark this whole thread under the "Unix Way"...
 
Go retro and find a keyboard that has the function keys arrayed down the left-hand side. There were a few types made, like the Northgate Omnikey.
 
Use chromium, no F12 for now at least. my F12 is bound to Guake, the way it should :-).
 
use good ol' firefox (but don't install firebug, it also opens by hitting F12!)
also, chromium. not google's remix of it.
 
I wonder if tampermonkey or any of the userscripts at userscripts.org will do it. I'm not sure of the limitations of the scripting engine but I'm sure it wouldn't take long to figure out. 
 
this is the funniest thing i have read today... thanks
 
Btw: can't Switch to the Condoleezza in Fedora 16. Have to press f12 before. Whats that?
 
Surely you just invent a completely new operating system and browser from scratch as a major open source project, and that way it works the way you want it to.
 
see, if you we're someone like ricky gervais you would be crucified for using the word "spastic"
 
At the risk of wading in and opening up a crock of shit, the use of the word spastic is perfectly reasonable in this instance because it is the adjective of the word spasm, which, when talking about pressing the wrong key, is fine.
 
Huh...there IS an F12...and it does something. Who knew?

I suppose you could just trim your finger back so that they don't reach that far...
 
How suggesting the feature to the chrome team in stead of random G+ rants :-P
 
+Jens Holst Schumacher but this is Linus Torvalds ... last time he posted random stuff like "... I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) ..." it had interesting side effects ;-). So usually his "random rants" do have a positive effect .... ;-)
 
I had this F12 problem a loooong time ago, and my solution.....
ever heard of super glue....?
 
Remove the key? Who need F12 anyway... ducks and runs for cover (well I actually did this with my G9x mouse, got completely fed up with clicking these speed +/- buttons by accident while left clicking and took some pliers to them, yes pliers, was too frustrated to do it the proper way by opening up the mouse)
 
Use a keyboard layout like neo, where the backspace is mapped to AltGr+W ( www.neo-layout.org ). Also saves you the hassle from changed the right hand between arrow keys and normal typing
 
Maybe you should try a MacBook pro, and everything is perfect -:P
Just in case, just joking
 
Just tried this. Take a stiff business card and jam it in the gap behind the backspace key. It then becomes a physical barrier.
 
Don't make mistakes, so you don't have to type on backspace, and then no risk to hit F12. Problem solved.
 
This is actually a big problem with Chrome: the broad inability to change key behavior. I frequently hit the backspace key thinking that I have a form element selected, but wind up accidentally making the browser go back, deleting the contents of the form I was filling out. Very aggravating.

I know this is a standard key in most browsers, but I find it bizarre; I have never thought or wanted to go back by hitting backspace.
 
Get a keyboard that doesn't have F12 above Backspace.
 
+Alexander Steshenko, nope, u'r wrong. The only one obvious reason is that Linus's typing is about a speed of light, where refresh rate for any ui component is tooooo slooooow for such ability, or do I misunderstand somethin'?
 
An alternative solution: Use the keyboard of Chuck Norris - it only has 2 keys: 0 and 1
 
I use sharpkeys [ http://www.randyrants.com/sharpkeys/ ] on Windows and xmodmap on Unix to get the keyboard mapping that I am comfortable with. It's quiet frustrating to try to find a new keyboard only to find all the "old" models replaced by "new" models with the keys shifted around. Just as annoying is the remapping of keyboard locations across OS installations. While the user becomes comfortable muscle trained for one system, the switch to the other OS installation then makes that a mess.
 
I trigger yakuake/guake with F12, so the worst case is to start typing in a terminal
 
What else do you use F12 for? I've never used anything past F9. Pull the key off.
 
have you tried looking at keyboard settings under start > control panel ?
 
And in this casses I only say: thanks God for my typing lessons in highschool. I hated then, but nowadays I see the benefits :)
 
Using Chromium's configuration and aiding shortcuts could help. Chrome:configure shortcuts?
 
Cmon, it can't be that bad... Once you've pressed F12, let your developer instincts kick in and continue typing in Javascript thru the console ($('editbox').value+='blah')...
Ok, on second thought, it is that bad...

Build a wall out of toothpicks.. For best results, add some seige towers...
 
How about you just save yourself a lot more time and energy and get a new keyboard :P.
 
Hi Linus, if you do not edit source code for Chromium, you can not change the F12 function. There is extensions to map other keys to actions if you are interested.
 
I use Guake (a drop-down terminal) on a normal basis, which takes over F12 by default. No problems here. :)
 
Switch to Colemak layout. :) There are two backspaces, the one I tend to use is positioned where Caps Lock would normally be.
 
My fingers go in a different direction so I end up hitting the 'print screen' key repeatedly. Brings up ksnapshot nicely when I want it to but a slight annoyance when I see how many times it is open and need to close it
 
haha. Brilliant! Some of the stuff I've done in the past tapping away without thinking about it. I hit the Y key once and it stayed down, endlessly printing Y to the screen. Really annoying.
 
Solution is simple: we eat the Batman (or just make a chrome plugin which rick-rolls you each time you press it)
 
I would like to suggest Firefox too >:D
 
I have the same problem with my laptop's mouse pad. Under Windows I can disable it when I have a auxiliary USB mouse plugged in but I can't seem to do this under Linux. Why isn't there such an option under the mouse applet? I use to be able to rmmod the psmouse driver but lately that has crashed the system.
 
+Linus Torvalds, Chrome is programmed in C + + instead of C, maybe that's the problem, hahaha =)
 
This is annoying, I think that should be F9 or context menu should only operate
 
Now I know why I keep getting a Chrome dev console.
 
I had no idea what F12 did so I hit it ... and all this time I've been using CTRL-SHIFT-J ... which I guess is more comfortable for an emacs user
 
I bet this would annoy me if I used a laptop keyboard ever, but with F12 bound to Yakuake I didn't even realize for ages what it was supposed to do in Chromium. Nice catch with CTRL-SHIFT-J, +Anthony Ventimiglia , I think I'll start using that rather than just right-clicking and selecting "Inspect Element".

Although Chrome is great in many ways, the dev's obsession with minimalism has gone too far when they're even removing the ability to re-bind keys.
 
suggestion: keyboard driver that ignores the f12 key
pa pi
 
+Linus Torvalds I use guake/yakuake (depends on my mood) which default to F12 as console pop-up shortcut (and I have nonintrusive console running all the time ready at my finger press). On my Windows machine I have a keyboard where it's possible to press F12 instead of Backspace. Hope it helps - and I didn't read all the comments.
 
+Ian Witham huh? Irony? My postings are way below your's, so I wonder what you were referencing ... (seriously)? Sorry I'm a bit lost here ...
david w
 
i have yakuake - so i get a nice bash shell each time i F12.... keeps it all real :)
 
+Linus Torvalds You just introduced me to something in Chrome I didn't know existed. Thanks, I just used the developer console to turn the background of the extra whitespace on the page maroon.

P.S. The amusement will probably wear off soon, then I'll forget about the developer console again until some unforseen time in the future.
 
+Linus Torvalds I tried to look for this a while ago and came to the same place as +Mike Murphy. That chrome plugin can change the F12 shortcut. It works on a tab with a webpage loaded (at least for me, it does not work in the "new tab") but you can asign javascritp code to F12. It is usefull, but it would be more usefull to look into the plugin's code and see how we can actually change this without a plugin.

https://chrome.google.com/webstore/detail/mgjjeipcdnnjhgodgjpfkffcejoljijf?hl=en
 
Thanks. i didn't know that did anything in a web browser.
 
For me the problem is Ctrl+Shift+C, which I often accidentally hit instead of Ctrl+C. It brings up the same console :| Wants a remap feature.
 
+Linus Torvalds Four years after ranting about it, there is still no way to set Firefox home directory. Let's all meditate on that for a moment. The flag exists in the code... can be changed in the code... but isn't user-settable. A home directory location. Not user-settable. ?!
 
^That. To use the system clipboard with gnome-terminal, you simply tap ^C and ^V (rather than ^c and ^v). So, come 4AM when I am no longer capable of distinguishing what I'm doing at the moment, I tend to tap the wrong one.

At least it loads (and unloads) very quickly.
 
xmodmap F12 to some other Function key? There should be some kind of about:config to maneuver the binding... Unless Chrome developers are complete 'tards.
 
jajajajaja F12 jajajaja "Dear LazyWeb, is there a way to disable the F12 key in chrome?"
 
Just an idea. If you change your Terminal settings to turn off F-keys in all terminal sessions and then if you start Chrome from that terminal, does that do anything? Im just saying this in case Chrome is binding its F-keys to the shell instance it runs in?
 
Although it hasn't been as much of a problem for me, I accidentally hit the F12 key at least a couple times a month on average, and when it does happen it's quite annoying ;-(
 
happens with me when i press Ctrl+Shift+C instead of Ctrl+C to copy something from chrome.
i have the habit of pressing Ctrl+Shift+C because i copy a lot from the terminal.
 
+Linus Torvalds Way without plugin: add this bookmarklet:

javascript: window.addEventListener("keydown", function(e) { if(e.keyIdentifier == "F12") e.preventDefault(); }, true)

You'd have to press it each time a page loads, but it'd work. Alternatively, put this in a file named "f12.user.js" (just the .user.js matters):


// ==UserScript==
//@name Disable F12 Dev Console
//@namespace http://anthonymaciel.com/
//@description Disable F12 Key for pulling up the Dev Console in Chrome
//@include *
// ==/UserScript==
window.addEventListener("keydown", function(e) { if(e.keyIdentifier == "F12") e.preventDefault(); }, true);

Then drag it into a Chrome window. It'll prompt you to install the user script, allow it and it'll block the F12 key browser wide (might have to refresh any currently open tabs). Ctrl+Shift+i and other shortcuts for the Dev Console will still work.
 
+Anthony Maciel Thanks for this! I had no idea Chrome supported Greasemonkey-style user scripts (since version 4, even)! I can't believe I missed this, but it'll sure come in handy.
Add a comment...