Re: Bypass events and get the physical keyboard state directly

Pekka Paalanen <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <20170220102018.64e806c0@eldfell>
On Mon, 20 Feb 2017 12:37:36 +1300
Bryan Baldwin <[email protected]> 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

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

iQIcBAEBCAAGBQJYqqbCAAoJECNf5bQRqqqnWKUQAJfi1/yAImnUxXelYi1NMDSJ
wKr/hpdGVosyLHIiT1Dc79MAVVK8m85bVQy/BHCTIBtO/A4WL99TMVmGvGIsira4
8LFRDxFYHvpZphUkJo74adFHLCJGqUZirFXMOvLiL4E2LMD97UkMWdXbZnQA3vj8
auabyHHK/wRi4X8um25Ze2S51YOpS4KhXBdxPDXhqz3n3AmfOc8jEvHd/gxPdmi9
+RRO/IyJz5WC2oNN/IzVp1F6bdV3o+yz+UGmnRh4PAs6yotd9lXidOoUwWoxSuEJ
csidBgUew5qZe96xqeLiqdoJ8HAK/V/zUoL3RhVxGrzQyaXaD0PPey7D1loXU6/T
ARpid3B2v+LKeasTzmyUr8OgazRy8r1ytvMYlP2+31+Hs9nJigcdJs+wgStBfZM3
KHZ7kQgCosAln1E9a+Gr/keHHV0CoCdvKbt/taGb9V4OIa165Jgq0RnANS91sMiK
YAbXJeYlzgTSMKPMP4ihw4o2VtvDhjUdqb3JQt15Uec/2B6a4UzzxrxGIsWGJegM
7yf25JfRG+GTX/VK1ESFdDJQ9hADrq5gb1uhdqUG88inWgcpRSN4mdI+dN7xjRWq
3kxabhBSNlTu/+ewVASZMf9U0LVTcGRCz9VeC4n6eamxikdKLf/B0Uqq8hwryjPk
c6TeCGp2iL/+R2kuzB67
=ouXg
-----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.