AddKeyboardShortcut() and keyboard layouts
Posted: Wed Nov 24, 2021 11:26 am
Check out this simple example:
This correctly works if I press cmd+f with English keyboard layout, but doesn't work in any other layout (no event is firing). I checked PB IDE and all shortcuts there work independently of currently active layout, so I tried to check IDE's sources, but haven't found anything specific, looks like it simply uses AddKeyboardShortcut() like I do.
I'm sure this is something minor and can be easily fixed, but have no idea where to look, can someone help?
Code: Select all
OpenWindow(0,0,0,400,300,"shortcut test",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
AddKeyboardShortcut(0,#PB_Shortcut_Command|#PB_Shortcut_F,0)
Repeat
ev = WaitWindowEvent()
If ev = #PB_Event_Menu And EventMenu() = 0
Debug "shortcut"
EndIf
Until ev = #PB_Event_CloseWindow
I'm sure this is something minor and can be easily fixed, but have no idea where to look, can someone help?