Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoselects YubiKey device #46

Closed
kbknapp opened this issue Dec 26, 2021 · 3 comments
Closed

Autoselects YubiKey device #46

kbknapp opened this issue Dec 26, 2021 · 3 comments

Comments

@kbknapp
Copy link

kbknapp commented Dec 26, 2021

If I don't use the --device flag, it autoselects my keyboard (from a Thinkpad T14s) and my Yubikey. I haven't looked at the source, but I'm guessing it's just using a heuristic of searching for *key*.

@k0kubun
Copy link
Contributor

k0kubun commented Dec 26, 2021

Only devices with Space, A, and Z and without a mouse left button are considered a keyboard: https://github.com/k0kubun/xremap/blob/2557edb190aa10a091963b2cb459834a07d34f45/src/input.rs#L140-L144 As I don't have a YubiKey and am not aware of how Linux recognizes it, is there any suggestion on how we could skip selecting it?

@kbknapp
Copy link
Author

kbknapp commented Dec 26, 2021

That's a reasonable heuristic. So without diving into whether or not certain devices should be automatically ignored (I.e. expanding the heuristic), just providing a way to ignore devices based off the name is fine. I.e. something like--ignore yubikey.

@k0kubun
Copy link
Contributor

k0kubun commented Dec 28, 2021

Supported the --ignore option in v0.1.4. I hope it's helpful for you. Please let me know if it works as you intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants