Detecting all keys in windowed screen
Posted: Sun Feb 18, 2018 1:48 am
Hi!
I need to know whether it's possible to detect all keys that are pressed or released in a screen opened by OpenWindowedScreen, no matter what keyboard layout. Basically I need the same functionality as in a CanvasGadget with keyboard input enabled. This Gadget returns codes like 65362 for up-arrow or 65362 for pause.
But ExamineKeyboard() doesn't work for me. Right now, on my linux machine, PB 4.61 does not trigger anything (tested KeyboardReleased until 1024) when I set the keyboard to German and press a letter like ä. It doesn't matter whether I set KeyboardMode(#PB_Keyboard_International) or KeyboardMode(#PB_Keyboard_Qwerty). I don't care how raw the keycodes are, as long as they are cross-platform and can be decoded somehow. I need to detect every key on the keyboard including all function keys, shift, alt, etc.
Is there any way to do this cross-platform within a windowed screen? If not it's a show-stopper and I have to revert back to drawing on a CanvasGadget, but that's too slow.

I need to know whether it's possible to detect all keys that are pressed or released in a screen opened by OpenWindowedScreen, no matter what keyboard layout. Basically I need the same functionality as in a CanvasGadget with keyboard input enabled. This Gadget returns codes like 65362 for up-arrow or 65362 for pause.
But ExamineKeyboard() doesn't work for me. Right now, on my linux machine, PB 4.61 does not trigger anything (tested KeyboardReleased until 1024) when I set the keyboard to German and press a letter like ä. It doesn't matter whether I set KeyboardMode(#PB_Keyboard_International) or KeyboardMode(#PB_Keyboard_Qwerty). I don't care how raw the keycodes are, as long as they are cross-platform and can be decoded somehow. I need to detect every key on the keyboard including all function keys, shift, alt, etc.
Is there any way to do this cross-platform within a windowed screen? If not it's a show-stopper and I have to revert back to drawing on a CanvasGadget, but that's too slow.