[xmonad] XInput support in XMonad?
Ilya Portnov
portnov84 at rambler.ru
Fri Aug 31 18:19:56 CEST 2012
Hello xmonad world.
My current desktop setup includes remote control unit, which sends
keyboard events (for example, it sends Ctrl-P on Pause button). I want
to handle such keypresses differently than keypresses from usual
keyboard. For example, currently, if I press Ctrl-P on keyboard or Pause
on the remote control, when Firefox window is active, both actions open
Print dialog. But I want to run, for example, "mpc pause" on Pause button.
AFAIK, one way to differ key/button press events from different devices
is to use XInput X11 extension. That extension might allow us to do many
other funny things; for example, we could get pressure value from wacom
tablets, and so on.
Technically, XInput support for XMonad will require FFI bindings to
XInput client library (-lXi) and changes in events processing in xmonad
core. Maybe, there should be new field in XMonad config, in addition to
`keys' and `mouseBindings', to specify XInput events handlers.
Currently i'm working on xinput FFI bindings.
Questions are:
* Could such changes in xmonad core events processing be accepted for
xmonad-core? Note that they will introduce new system library dependency
(-lXi in addition to existing -lX11).
* What features of XInput might be useful for XMonad? For example, I
don't know what to do with pressure value in window manager, but maybe
someone knows?
Any other thoughts are welcome too.
With best regards,
Ilya Portnov.
More information about the xmonad
mailing list