Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libinput to monitor for events on Linux #116

Open
DanielJoyce opened this issue Oct 20, 2023 · 3 comments
Open

Use libinput to monitor for events on Linux #116

DanielJoyce opened this issue Oct 20, 2023 · 3 comments

Comments

@DanielJoyce
Copy link

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.

@lthms
Copy link

lthms commented Dec 29, 2023

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

@FoxxMD
Copy link

FoxxMD commented Feb 6, 2024

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

@Zhou-Tx
Copy link

Zhou-Tx commented Feb 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants