Note: The linux-static-hidraw backend is not affected by this issue.
let api = HidApi::new().unwrap();
dbg!(
api
.device_list()
.filter(|e| is_my_device(e))
.map(|e| (e.clone(), e.usage_page(), e.usage()))
.collect::<Vec<_>>());
where is_my_device compares the PID and VID to that of my Moonlander keyboard.
The output is 4 times exactly the following:
With 7 instead of 4 devices found, and all with non-zero usage pages and usages.
Am I using the Rust API incorrectly here? My goal is to read from and write to the first device in the Python enumeration, which corresponds to QMK's raw HID feature.
Note: The
linux-static-hidraw
backend is not affected by this issue.where
is_my_device
compares the PID and VID to that of my Moonlander keyboard. The output is 4 times exactly the following:Notably, both the usage page and usage are 0.
Running comparable code in with Python's hid results in the following output:
With 7 instead of 4 devices found, and all with non-zero usage pages and usages.
Am I using the Rust API incorrectly here? My goal is to read from and write to the first device in the Python enumeration, which corresponds to QMK's raw HID feature.