Windows 10/11, PB 6.02
I need to detect the TAB key. All (?) the other keys return the key code except the TAB key. I'm sure this worked in the past.
Cheers.
Code: Select all
If OpenWindow(0, 0, 0, 220, 220, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200,#PB_Canvas_Keyboard)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
If EventGadget()=0
If EventType() = #PB_EventType_KeyDown
Debug GetGadgetAttribute(0,#PB_Canvas_Key)
EndIf
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf