How to intercept all keyboard events
Andreas Wettstein
wettstein509 at solnet.ch
Sun Sep 26 06:12:44 PDT 2010
> So when you mention "Practically, I believe the greatest problem in
> this modern world with all its multimedia keyboards is to find
> keycodes that are guaranteed not to be taken by real keys.", are you
> talking about a limitation in this approach for my problem, or is it
> possible to override already taken keys with an action binding?
You can override already taken key with an action binding. The problem
is that the described approach needs to allocate keycodes which do not
correspond to real keys for "pseudokeys" that are operated by your
program exclusively. But which keycodes to use for pseudokeys? There
are 248 distinct keycodes, and about 105 keys on a normal PC keyboard,
so in principle, there are plenty 143 of keycodes left for pseudokeys.
However, many of the 143 keycodes could possibly be assigned to a
multimedia key. We do not know whether a given keycode is available for
a pseudokey or, in contrast, must be captured with an ActionMessage.
> Your approach with action messages gives me the ability to do the
> processing in the WM, so I could implement the second version in a
> comfortable way.
If you implement this not in a WM, but in a standalone application (run
in the background), everyone can use you program and keep still their
favourite WM...
Andreas
More information about the xorg
mailing list