Windows 10 Global (App Registered) Hotkeys listing

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 23 Oct 2019, 03:28

Hi Community,

I hope I post in the right place 'cuz I have a pretty shallow background in keyboard specific events.

I'm desperately trying to find a software capable of listing registered global hotkeys / shortcuts (typically, to spot conflicting apps upon a specific combination)

I've already found a couple (e.g. : Hotkey Commander) but they all seem to be tackled by some new Windows 8.1+ paradigm.

Obviously, there is no central repository of how a specific app deals with some key event it subscribed to...

...nonetheless, I can 't imagine there's no central routing registry into which Windows looks up in order to dispatch keyboard events to those apps having registered a callback to (specifically through RegisterHotKey API)

I guess there's no secret about the keyboard event-model for the AHK community ; I'm sorry if this makes a dup (please mention) but I've really tried to RTFM before posting here.

Thanks

Pinkel
Posts: 1
Joined: 07 Jan 2020, 12:29

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by Pinkel » 07 Jan 2020, 12:33

HotkeysList from www.nirsoft.net

xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 08 Jan 2020, 04:17

Hi Pinkel,
Thanks for the time you took to reply.
Plenty of neat tools at nirsoft
Nonetheless, as of HotKeysList v.1.0 (2015) :
"This utility works on any version of Windows, starting from Windows 2000 and up to Windows 8. Both 32-bit and 64-bit systems are supported. "
...and as a matter of fact, on my Windows 10, I won't find my registered Vlc global hotkeys in the list (typically, I use Ctrl+Alt+RightKey for next song)
Any other hint is welcome about how to figure out from scratch that Vlc is the one application that registered Ctrl+Alt+RightKey.
Thx

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by swagfag » 08 Jan 2020, 05:21

set spy++ or a similar message monitor to monitor WM_HOTKEY messages, do the shortcut, observe which hwnd generated/intercepted the message. repeat for both 32bit and 64bit

xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 08 Jan 2020, 05:52

Hello Swagfag,
That's indeed a working solution but it supposes indeed a monitoring / event trace from the very start of the OS or at least session (quite a constraint to me)
I'm really searching from some dump tool at some point of time (and this registration table necessarily exists somewhere with callbacks to the registering apps ; once I know the app, it's another job to find what a global hotkey is supposed to do but just that registration table would satisfy me)
Thanks

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by swagfag » 08 Jan 2020, 06:00

an app intercepting hotkeys need not use RegisterHotkey. nirsoft's utility shows u the registration table, but apps implementing their own hooks and message loops won't appear there

xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 08 Jan 2020, 07:11

Hello,

> an app intercepting hotkeys need not use RegisterHotkey

I am only talking about GLOBAL hotkeys and since event are dispatched to the registering app although it doesn't have focus (e.g. : I can do editing in Word while listening to music in Vlc and skip to next song without switching to vlc) I guess that Windows 10 has necessarily somewhere a registration table stating "for Ctrl+Alt+rightArrow, dispatch to Vlc" and obviously, only Vlc knows that this stroke combination should be mapped to "next song"
...but just knowing that Vlc registered the Hotkey (combination) is enough for me.

xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 25 Feb 2021, 14:59

Hi Community,
I'm allowing myself a quick bump a year later on this thread 'cuz I'm still totally stuck on this subject.
Anyone with any hint about how to dump globally registered hotkeys with even minimal information ?
(there must be some way because many apps manage to spot those hotkeys that are already in use)
Thanks

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by swagfag » 26 Feb 2021, 20:50

on my Windows 10, I won't find my registered Vlc global hotkeys in the list (typically, I use Ctrl+Alt+RightKey for next song)
on mine it does
I can 't imagine there's no central routing registry into which Windows looks up in order to dispatch keyboard events to those apps having registered a callback to (specifically through RegisterHotKey API)
...
this registration table necessarily exists somewhere with callbacks to the registering apps
...
I guess that Windows 10 has necessarily somewhere a registration table stating "for Ctrl+Alt+rightArrow, dispatch to Vlc" and obviously, only Vlc knows that this stroke combination should be mapped to "next song"
of course. Windows certainly has a struct somewhere thats keeps track of the mapping. the point is, there isn't an easily consumable API that exposes that information. if u want to have a crack at reversing Windows and finding the struct(and redoing it for every next new patch thereafter), knock urself out
(there must be some way because many apps manage to spot those hotkeys that are already in use)
maybe but they probably dont tell which app is responsible for the conflict, since they just try creating their hotkeys with RegisterHotKey() and see that it fails. or if u know of open source ones that do, then copy their implementation
once I know the app, it's another job to find what a global hotkey is supposed to do
lol yeah, good luck with that
Anyone with any hint about how to dump globally registered hotkeys with even minimal information ?
the two ways have been described:
  • RegisterHotkey() all VKs from 0 to 0xFF with every possible modifier combination. See which ones fail(those are the currently registered global hotkeys). Unregister all the ones that didnt. Thats what Nirsoft does probably
  • inject a DLL into every process's message pump and monitor for an incoming WM_HOTKEY message. u can do this urself by writing ur own x86/x64 DLLs and injecting them with SetWindowsHookEx for instance(eg https://github.com/ITachiLab/hotkey-detective) or use a program for it(eg spy++) which pretty much does the same thing

at any rate, looks like ure at the forefront of research into this matter. u could try asking for a microsoft dev on the microsoft forums to explain how to do it or u could tweet @ChenCravat, maybe hell write a blog post about it lol

xkb
Posts: 6
Joined: 15 Oct 2019, 10:43

Re: Windows 10 Global (App Registered) Hotkeys listing

Post by xkb » 27 Feb 2021, 03:49

Hi swagfag,
I guess I deserve your (mild) sarcasms for not being sysos-literate enough.
You're probably right about the try/fail approach apps do implement.
So my "mission" stops right here ;-)
I'm just sorry to reckon yet another API without proper getters matching setters.
Thanks for taking the time of this thorough reply.
Cheers
X.

Post Reply

Return to “Other Utilities & Resources”