-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
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
Lines 391 to 399 in b946f93
| /// Returns the raw "value" field directly from input_event. | |
| /// | |
| /// For keys and switches the values 0 and 1 map to pressed and not pressed respectively. | |
| /// For axes, the values depend on the hardware and driver implementation. | |
| #[inline] | |
| pub fn value(&self) -> i32 { | |
| self.0.value | |
| } | |
to reproduce just listen on the events of some device using into_event_stream from the feature tokio
Metadata
Metadata
Assignees
Labels
No labels