[Solved] Hotkey failure
Posted: Fri Jan 27, 2023 10:44 am
One of my users emailed me to ask why they can't use Shift+Ctrl+Numpad1 for a hotkey (my app lets them specify their hotkeys).
And guess what; they're right! Why isn't this working, despite RegisterHotKey_() returning success? It doesn't work in a callback, either.
Is it a bug, or a Windows (OS) limitation? It works if I use just Ctrl+Numpad1, so Shift seems to stop it? Why 1 for success, then?
And guess what; they're right! Why isn't this working, despite RegisterHotKey_() returning success? It doesn't work in a callback, either.
Is it a bug, or a Windows (OS) limitation? It works if I use just Ctrl+Numpad1, so Shift seems to stop it? Why 1 for success, then?
Code: Select all
OpenWindow(0,400,200,640,240,"test",#PB_Window_SystemMenu)
Debug RegisterHotKey_(WindowID(0),0,#MOD_SHIFT|#MOD_CONTROL,#VK_NUMPAD1) ; Returns 1 (success)
Repeat
ev=WaitWindowEvent()
If ev=#WM_HOTKEY
Debug "this is never seen"
EndIf
Until ev=#PB_Event_CloseWindow