Browse Source

Exclude Yubico devices on Linux

master
Travis Burtrum 5 months ago
parent
commit
e6f4653570
  1. 3
      src/linux/device/input_device.rs

3
src/linux/device/input_device.rs

@ -83,7 +83,8 @@ impl InputDevice { @@ -83,7 +83,8 @@ impl InputDevice {
unsafe {
eviocgname(raw_fd, &mut name)?
};
if NAME.as_bytes() == &name {
// exclude anything starting with "Yubico" also
if NAME.as_bytes() == &name || "Yubico".as_bytes() == &name[0..6] {
return Err(Error::NotAKeyboard);
}
return Ok(self);

Loading…
Cancel
Save