WM_HOTKEY how to notice a global hotkey release (keyup)?
-
on pressing the global hotkey for some time ... I get a lot of WM_HOTKEY messages. But how to notice the release of the hotkey button? WM_KEYUP Notification (according to msdn) is posted to window with KEYBOARD FOCUS. but since i have a global hotkey i won't necessarily have keyboard focus. any suggestions?
-
on pressing the global hotkey for some time ... I get a lot of WM_HOTKEY messages. But how to notice the release of the hotkey button? WM_KEYUP Notification (according to msdn) is posted to window with KEYBOARD FOCUS. but since i have a global hotkey i won't necessarily have keyboard focus. any suggestions?
Maybe you can have some sort of variable saying that you are processing the hotkey currently, if you are then return from that message eg. ON_WM_HOTKEY() { static bool processing = false; if (processing) return; processing = true; // do some work; processing = false; }
-
Maybe you can have some sort of variable saying that you are processing the hotkey currently, if you are then return from that message eg. ON_WM_HOTKEY() { static bool processing = false; if (processing) return; processing = true; // do some work; processing = false; }
ty but doesnt work; since on release i dont get a WM_HOTKEY message and after releasing i wont get in the mentioned function (ON_WM_HOTKEY)