-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I am trying to get the absolute mouse position, possibly in relation to the current screen, it may as well be some arbitrary value.
I do get an event with regards to motion, but that's relative.
How does one enable the Absolute events to work?
This is what I have:
let mut device =
uinput::default()
.unwrap()
.name("name")
.unwrap()
.event(uinput::event::Keyboard::All)
.unwrap();
for v in uinput::event::controller::Mouse::iter_variants() {
device = device.event(v).unwrap();
}
device = device.event(Event::Absolute(Absolute::Position(Position::X))).unwrap().min(0).max(100);
device = device.event(Event::Absolute(Absolute::Position(Position::Y))).unwrap().min(0).max(100);
let mut device = device.create().unwrap();
The only event that is incoming for Motion is:
Pointer(Motion($struct_name @0x7fd06c0413a0))
Anything obvious I am doing wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels