List of all current hotkeys in Windows
Posted: 31 Oct 2022, 14:59
Is there any way to find all hotkeys that are registered in Windows?
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=110018
Code: Select all
SetBatchLines, -1
list := ""
Loop 255 {
vk := A_Index
if ((keyName := GetKeyName(Format("vk{:x}", vk))) = "")
continue
if RegExMatch(keyName, "^Numpad\K.+", key) && GetKeyVK(key) = vk
keyName := key
Loop 16 {
modifiers := A_Index - 1
if DllCall("RegisterHotKey", "Ptr", A_ScriptHwnd, "Int", 1, "UInt", modifiers, "UInt", vk)
DllCall("UnregisterHotKey", "Ptr", A_ScriptHwnd, "Int", 1)
else {
for k, v in {1: "Alt", 2: "Ctrl", 4: "Shift", 8: "Win"} {
if (modifiers & k)
list .= v . "+"
}
list .= keyName . "`n"
}
}
}
Sort, list
MsgBox, % Clipboard := list