Hello all,

I've been writing game code, and have gone adrift with a big problem
with keyboard input.

The properties I'm getting through SDL2 contain key up/down,
pressed/released, and repeat. I've read either that the pressed/released
properties are only set with the key actually physically down, or that a
keyboard event will at least have the repeat property set if the key is
a repeat. I can't confirm that any of this is true in code.

No matter what I do, if I hold down a key I get the first key down +
pressed event, a subsequent event flagged as a repeat at the delay
threshold (500ms), and then a deluge of *unflagged* key down+pressed /
key up+released event pairs for the rate interval that continue
repeating well after the key is actually released. I tried using SDL2's
GetKeyboardState instead, but this produces identical results. Its the
same data as events with a different interface.

The documentation I've read for keyboard input with X11 also follows a
very similar event-based model, but what I want is a way to check the
keyboard and literally only see exactly what the state of the keys at
the instant that that call is made, and by-pass any and all other
processing entirely, including auto-repeat.

Can anyone point me in the right direction?

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to