How to disable the Windows key

Windows Key

ask pc gamer

Ask PC Gamer is our weekly question and advice column. Have a burning question about the smoke coming out of your PC? Send your problems to letters@pcgamer.com.

Look, See? I am a PC Gamer. I am impressed—really!—by the knowledge the Windows key does all that. However, due to my empirical knowledge of how aggravating the Windows key is to my PC Gaming I will continue to remove the Windows key from my keyboards. —Klimek Shannon

OK, so that wasn't a question, but it brings one up. That was a response to my post from last week, in which I offered a few of my favorite Windows shortcuts and tricks. While the Windows key can be useful for the highly efficient PC gamer, Klimek points out that it can also be the cruelest key of them all. Accidentally dumping yourself to the desktop in the middle of a competitive game is worse than accidentally hitting Insert and typing over a sentence. Thankfully, there are ways to disable it.

As commenters pointed out, some keyboards (like the one pictured) include a button to disable the key. On my Thermaltake keyboard, the left Windows key is replaced with an Fn key, so I don't worry about it. If you're out of luck with your keyboard, though, you can still disable the key in Windows 7 with a bit of registry editing. Here, directly from Microsoft support, is how to do it:

  1. Click Start, click Run, type regedt32, and then click OK.
  2. On the Windows menu, click HKEY_LOCAL_ MACHINE on Local Machine.
  3. Double-click the System\CurrentControlSet\Control folder, and then click the Keyboard Layout folder.
  4. On the Edit menu, click Add Value, type in Scancode Map, click REG_BINARY as the Data Type, and then click OK.
  5. Type 00000000000000000300000000005BE000005CE000000000 in the Data field, and then click OK.
  6. Close Registry Editor and restart the computer.

If you don't want to mess with your registry yourself, which can be dangerous, Microsoft will do it for you with a little download on the support page. Or you can try a different method, with a program that's handy to have anyway, and keep the shortcuts. [The following has been revised thanks to solliddd's great comment.]

AutoHotkey is what you want. Download the program (it's free and open source) and run it, then right click on its icon in the taskbar. Select 'Edit This Script' and it'll open the default script in Notepad. Somewhere between the comments (which are marked with semi-colons) add the following:

~LWin Up:: return
~RWin Up:: return

Now just save the file, right click on AutoHotkey again, and select 'Reload This Script.' Both Windows keys should now do nothing when pressed on their own, but shortcuts will still work. Now you'll never end up looking at the desktop when you meant to crouch. Whew.

Note: Some online games may detect AutoHotkey as a potential cheating application, though I always have it running and have never had a problem. Obviously, if you're creating scripts to automate in-game actions, the game's moderators may not approve. Use it at your own risk!

Tyler Wilde
Editor-in-Chief, US

Tyler grew up in Silicon Valley during the '80s and '90s, playing games like Zork and Arkanoid on early PCs. He was later captivated by Myst, SimCity, Civilization, Command & Conquer, all the shooters they call "boomer shooters" now, and PS1 classic Bushido Blade (that's right: he had Bleem!). Tyler joined PC Gamer in 2011, and today he's focused on the site's news coverage. His hobbies include amateur boxing and adding to his 1,200-plus hours in Rocket League.

Latest in Gaming Industry
Gabe Newell
Gabe Newell is hooked on Stalker 2 and once he's got the fourth ending (!) will 'figure out what I'm going to play next'
Valve logo with a man with a steam valve for an eye.
Valve's DRM was inspired by an exec's nephew, who 'used a $500 check I'd sent him for school expenses and bought himself a CD-ROM replicator… he sent me a lovely thank you note'
Max, from Life is Strange: Double Exposure, looks ponderingly off into the distance.
'We all got laid off', says former Deck Nine narrative designer, after no-one was around to pick up Life is Strange: Double Exposure's GDC Awards win
An edited Microsoft/Steam logo, illustrating the potential future integration Microsoft has for an Xbox app.
Microsoft crawls back to Steam ahead of schedule by leaking a screenshot of an app where you can launch Steam games through Xbox
The "mind blown" meme from Tim & Eric.
Friendship ended with human race: Boffins declare the 'meme Turing test' has been passed, and AI is now making funnier captions on average than you useless lumps
Gabe Newell in a Valve promotional video, on a yacht.
Valve CMO threatened the company would walk away from games if it didn't own the rights to Half-Life—'It wasn't an idle threat—we weren't going to take on all of the risk to make other people rich'
Latest in Features
Fragpunk
Somebody finally figured out casual Counter-Strike
Dean Hall at GDC 2025.
Outer space inspired DayZ's Dean Hall to become a modder and game developer, and now he's making a Kerbal successor called Kitten Space Agency
An image of a corpse with the text "You've been re-educated."
I played the lost videogame sequel to 1984, and came away more nostalgic than ever for gaming's awkward adolescence in 1999
Bears in Space
I downloaded this bear-obsessed comedy FPS to kill time before Doom: The Dark Ages and discovered the most underrated shooter on Steam
Fallout 76 ghoul screenshots
Getting to level 50 in Fallout 76 to become a ghoul actually isn't as daunting as it seems, which is why I created a new character
A man turns away from an open window while monsters gather in the dark
Look Outside is a survival horror RPG where you absolutely should not look outside