Re: Bypass events and get the physical keyboard state directly

Bryan Baldwin <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <[email protected]>
Okay, so further investigation has lead me to test code against evdev
directly. Nevermind ;)


On 02/20/2017 11:19 AM, Bryan Baldwin wrote:
> 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?
>
>
>
> _______________________________________________
> xdg mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/xdg

_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg
signature.asc (application/pgp-signature, 862 B)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEE1OFiBHnOnhbgzKuUFdP+xtZORC8FAliqLEAVHGJyeWFuQGth
dG9maWFkLmNvLm56AAoJEBXT/sbWTkQvMhYP/1rflOOnxgRkPN6BuhPxljWbo9Wk
bRY4zsmvOPj9yHkJRfjbFFoZk8tvlzO4Wr5cTa4862zMSlfTbisu4OnDd8X1ToAN
oMLZSUnVkmo+8s9q74qzm5Z0xpqftXMmFFg3jWRW2nD9cv92SE1U1e9giw0n2jtC
Zd6ykSiET6qEJpU0iAyG/UgwZ2gBTGJE/Ttb/V08ekG5Lz0vcxanqpoNnLvob0UI
5rWYfuY4Ge3ePpy5D6SOX+/XXnIEZe2Ny1Pk8A61mXLpaJz10D/8lywMG4Roydaa
WlsVBMgLV4/2U2n+k8p71DNphigAYkwr5aJer5wZtp6zuQ3gW6JETuMQRhZImER8
SrIBBhGS5CsguORKlOEIPdHF9+tfL/O58gCdwDk6CUt/RROTzM/jbU3E4Ab/0fw0
Gib0qiOQ9WJrAvN1q3tNvJGmZ3m6QOGd8s5DzAqbtYc8QTftv8UPS03I1YLoF8k2
vtmEty4tK3UqDjYd2cgNeX9aPq9DZu1eC5eWPqWJ5hSMB12d3g48RVOeRtU/ja58
r33GzApwLR9pPIDeI8umduvv8ONoQ+VAIyRNfT+DUVG9Q6mGz6GYBQNlAOo9n3gA
0Na+tnIMZfdhI691LjOyA9mn11ttfBOEFZ/VntMa7qSZfSwXtRxufk2mOOgdhY5G
7rLg7IjQFMivca8w
=ucVa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.