2013-10-04

Disabling hot keys in Windows 8 using AutoHotkey

I have written previously about my disappointment with the design direction of Windows 8.

One of the most annoying "features" of this new Windows are the plentiful hot keys for things I really don't need, including WinKey + Enter (starts Narrator), WinKey + Plus (starts Magnifier), and of course the classic, the Windows key itself. When playing a game - I play World of Warcraft - it's very easy to press the Windows Key by accident, helpfully replacing your entire screen with the Start Menu, usually when it's needed the least.

I finally downloaded AutoHotkey to solve these problems. The following is the script I use:


; Disable WinKey + Enter (Narrator)
#Enter:: return

; Disable WinKey + Plus/Minus (Magnifier)
#+:: return
#=:: return
#-:: return

; Remap the Start menu to WinKey + S
#s:: send {LWin}

; Disable WinKey when pressed alone
~LWin Up:: return
~RWin Up:: return

; Set NumLock state to always on
NumLock:: SetNumLockState, AlwaysOn

; Disable extra mouse buttons being sent to Firefox (they act as Forward and Back)
; Disable Ctrl+W - closes current tab, frequent work destroyer during text editing
#IfWinActive ahk_class MozillaWindowClass
XButton1:: return
XButton2:: return
^w:: return
#IfWinActive


I prefer to have my NumLock state locked to remain always on. Your preference may vary.

To have a script like this start automatically:
  1. Save the script somewhere and give it an .ahk extension.
  2. Press Ctrl+C with the script file selected in Windows Explorer.
  3. Open the Windows Startup folder. On Windows 8, you can get there via Start menu > type "shell:startup" > Enter.
  4. Right click and select "Paste shortcut".
AutoHotkey will now run in the background with this script whenever you log into Windows.


Edit 2015-03-17: Added section to disable extra mouse buttons (mouse buttons 4 and 5) being sent to Firefox. It's super frustrating how an accidental squeeze of those buttons discards any work you might have been doing in the browser window - and this behavior cannot be turned off in the browser.

1 comment:

Kurt Coleman said...

I also have a healthy dislike for win8 but never accidentally hit the windows key. I dont like how it has taken over my Skype. It hasnt bothered me enough to figure out how to disable it but it is aggravating that it is a full screen deal and not a simple little window like Ventrillo or TeamSpeak. I always had a problem with the CapLock button so every time I pry that little sucker off.