Global hotkey release (keyup)? (WIN32 API)

后端 未结 2 1490
忘了有多久
忘了有多久 2020-12-10 15:50

Is there a way to notice the release of a hot-key button registered with RegisterHotKey?

I get a WM_HOTKEY message every time I press the h

2条回答
  •  春和景丽
    2020-12-10 16:24

    There is no specific notification for that specific action. You will have to write a DLL that implements a global keyboard hook via SetWindowsHookEx(), then you will receive individual keypress up/down notifications and can match them up to your WM_HOTKEY notifications as needed.

提交回复
热议问题