List of all current hotkeys in Windows

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jd5000
Posts: 17
Joined: 29 Oct 2022, 02:27

List of all current hotkeys in Windows

31 Oct 2022, 14:59

Is there any way to find all hotkeys that are registered in Windows?
teadrinker
Posts: 4373
Joined: 29 Mar 2015, 09:41
Contact:

Re: List of all current hotkeys in Windows

01 Nov 2022, 02:02

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee and 205 guests