Page 1 of 1

List of all current hotkeys in Windows

Posted: 31 Oct 2022, 14:59
by jd5000
Is there any way to find all hotkeys that are registered in Windows?

Re: List of all current hotkeys in Windows

Posted: 01 Nov 2022, 00:17
by noname

Re: List of all current hotkeys in Windows

Posted: 01 Nov 2022, 01:40
by jd5000
Perfect, thanks!

Re: List of all current hotkeys in Windows

Posted: 01 Nov 2022, 02:02
by teadrinker

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

Re: List of all current hotkeys in Windows

Posted: 01 Nov 2022, 04:25
by garry
@teadrinker thank you , have always a solution
here meaning to windows shortcuts
https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec