Bypass events and get the physical keyboard state directly
Pekka Paalanen
ppaalanen at gmail.com
Mon Feb 20 08:20:18 UTC 2017
On Mon, 20 Feb 2017 12:37:36 +1300
Bryan Baldwin <bryan at katofiad.co.nz> wrote:
> Okay, so further investigation has lead me to test code against evdev
> directly. Nevermind ;)
But if you run under any kind of display server (windowing system),
that won't usually work at all, or works wrong.
That is also why any kind of "bypass the display server" will not
generally work. There is a myriad of reasons for that, including
permission and security issues, even starting from how to even pick the
right devices.
You really are expected to keep the keyboard state tracked in your app,
based on the events. Even evdev works like that. If you were writing
for Wayland, there would be libxkbcommon to do that, and I believe SDL2
already uses libxkbcommon anyway (on Wayland).
OTOH, if you were not running under any display server, then you'd be
fine with that approach.
Your question would be better directed at SDL or the specific window
system fora (e.g. mailing lists).
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20170220/d69d1e56/attachment.sig>
More information about the xdg
mailing list