rdev icon indicating copy to clipboard operation
rdev copied to clipboard

Use libinput to monitor for events on Linux

Open DanielJoyce opened this issue 2 years ago • 3 comments

This will provide compatibility for Wayland and X11, as X11 uses Libinput under the hood now for its event source.

There are several linux keyboard macro systems now that use libinput for example.

DanielJoyce avatar Oct 20 '23 17:10 DanielJoyce

I’d be willing to contribute to rdev to add this. Any advice about that before I dive in? My understanding is that the key file to update is listen.rs

lthms avatar Dec 29 '23 19:12 lthms

I've got a sample app using libinput that gets key code events and (some) mouse information, here, that may be of use. Problems I'm encountering currently:

  • Key codes do not match with what rdev has defined
    • EX libinput key event a is 30 => rdev is 38
    • libinput b is 48 => rdev is 56
    • libinput c is 46 => rdev is 54
  • Pointer motion events (for a mouse) are limited to relative XY changes
    • Getting initial absolute position seems to be non-trivial since wayland doesn't allow querying the mouse outside of the windows owned by the application

FoxxMD avatar Feb 06 '24 19:02 FoxxMD

我已收到你发的邮件,谢谢

Zhou-Tx avatar Feb 06 '24 19:02 Zhou-Tx