Post

Note for Windows PC users - apologies for the shift keys not working properly. I've mapped left shift to CAPS SHIFT and right shift to SYMBOL SHIFT. For some reason a KEYUP event consistently goes missing when you hold both shift keys then release one or both. Works fine on Linux and Mac.

No, In my distilled Windows test example I'm using VK_LSHIFT and VK_RSHIFT in the messages WM_KEYUP/DOWN. In the emulator I'm using SDLK_LSHIFT/RSHIFT.

0 reposts0 likes

windows treats modifier state as unified , e.g. here both shift keys, but will only send one keyup when the last is released. you can call getkeystate for vk_lshit and rshift on every shift event (keyup, down, syskeyup, etc) like bool ls = GetKeyState(VK_LSHIFT) & 0x8000) != 0 . or raw input.

Indeed, that's pretty much what I'm seeing, and I can also confirm that the shift keys can be read correctly using GetKeyState. The key up/down events are all I've got to work with at the moment as it needs to be cross-platform. I'll come back to it when I've got more time on my hands.

The plan (at the moment) will be to avoid using keydown/up events and just scan the required keystates. I like the idea of using left and right shift keys as it feels natural (as a ZX Spectrum owner). Might have a crack at it this weekend.