Disable taskbar hotkey?
On Windows 8 pressing "Windows + T" in any program moves keyboard focus to the taskbar.
I want to assign a different function to this hotkey, but the default is overriding my custom one. How can I disable the taskbar's hotkey?
Disable specific hotkeys
Although undocumented, File Explorer (previously known as Windows Explorer) provides a per-user registry entry which can selectively disable some Explorer-related hotkeys. The registry value is called DisabledHotkeys
and is located at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Each character in the string data represents one key which is to be disabled in all its supported combinations. For instance,
F
disables both Win+F and Win+Ctrl+F. Interpretation is in terms of what programmers know as virtual-key codes. Alphabetical keys must be in upper case. For the F1 key, use the lower-casep
. For the Break key, the character must have the numerical value0x13
.Source: Disable Global Hot Keys
Example
To disable Win+T follow these steps:
Open a command prompt.
-
Type or paste the following command, and press Enter.
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "DisabledHotkeys" /t REG_SZ /d "T" /f
Log off and log back on to apply the changes.
Remarks
Works in Windows Vista and later. Only up to 22 characters of data are supported.
-
According to my tests, by using this method you can't disable the following Win+x shortcuts:
-
Windows Vista
Tab L U
-
Windows 7
Tab ← ↑ → ↓ C H L P U V
-
Windows 8.x
Tab Space ← ↑ → ↓ C H I J K L O P U V X Z
-
References
- Keyboard shortcuts
- Disable Global Hot Keys
- Virtual-Key Codes
I don't know of a way to disable individual Windows-key hotkeys, but they can be disabled en masse by means of a registry change, expressed here in Microsoft's .reg file format:
"Windows Registry Editor Version 5.00"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001
The change thus described may be made manually in Registry Editor, or by copying the above example to a file with extension ".reg" and run it; then, restart Windows Explorer via Task Manager (or just log out and back in) so that the change will take effect. To reverse the change, modify the file to contain dword:00000000
, run it, and restart Explorer again. (At the linked site, you can download a zipfile containing pre-written .reg files for both options.)
If you want to retain some Windows-key hotkeys, while disabling others, your best option as far as I know is to disable them all using the above method, then use AutoHotkey or some equivalent to create hotkey bindings for the actions you wish to retain.
Some such actions, such as invoking the Run dialog as Win
-r
, require Windows API calls to implement; this site mentions a command-line method of invoking the Run dialog, thus:
rundll32.exe shell32.dll,#61
Similar methods will exist for other special actions; they may take some digging, but patience and perseverance will turn them up in the end.
Update: Even by this method, you may find it's not possible to override Win
-l
, the "lock screen" hotkey; it's been a couple years since I last messed with that, but if I recall correctly, that chord is trapped at a low enough level that even the user's Windows Explorer session never sees it, which would mean this method wouldn't affect it. Of course, I could misremember, so give it a try and see what happens.