ITachiLab / hotkey-detective

A small program for investigating stolen hotkeys under Windows 8+
GNU General Public License v3.0
362 stars 16 forks source link

Check if hotkeys registered with WM_SETHOTKEY should be checked too #15

Open ITachiLab opened 1 year ago

ITachiLab commented 1 year ago

RegisterHotKey isn't the only method that can be used to register a hotkey. Application can post WM_SETHOTKEY message to a window to assign a hotkey to it, but this is a different kind of hotkeys than hotkeys registered by using the mentioned system call.

Explore the topic and check if hotkeys registered with WM_SETHOTKEY are:

According to Microsoft documentation, the hotkey brings up the associated window into a foreground, but only when the message is passed to DefWindowProc. What happens when it is serviced by the application instead, and never makes it to the default window procedure?

Links

https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-sethotkey https://learn.microsoft.com/en-us/windows/win32/menurc/wm-syscommand