Exclude Yubico devices on Linux
moparisthebest/rusty-keys/pipeline/head This commit looks good Details

This commit is contained in:
Travis Burtrum 2021-12-12 22:29:45 -05:00
parent 552cd50266
commit e6f4653570
1 changed files with 2 additions and 1 deletions

View File

@ -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);