evdev icon indicating copy to clipboard operation
evdev copied to clipboard

value on InputEvent got it the wrong way around

Open madsbyriel opened this issue 2 weeks ago • 0 comments

Docs maybe got it the wrong way around

When writing a key listening program using evdev in Rust I found this documentation to have it the wrong way around.

What I receive: 1 when I press the button 2 when the button is held 0 when it is released

https://github.com/emberian/evdev/blob/b946f93b9a6d26e7e5ab9cafc8ad066da50b779a/src/lib.rs#L391-L399

to reproduce just listen on the events of some device using into_event_stream from the feature tokio

madsbyriel avatar Dec 28 '25 22:12 madsbyriel