vmonaco / kloak

Keystroke-level online anonymization kernel: obfuscates typing behavior at the device level.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

autodetect keyboard device

adrelanos opened this issue · comments

Is there some way to autodetect the user's keyboard /dev/input/... device?

That would be required so this can become as simple for users as possible. I.e. a package kloak (#3) and autostart kloak. Once I know a way to autodetect the keyboard, I will configure kloak's systemd unit file to do that.

This should be possible according to
http://unix.stackexchange.com/questions/74903/explain-ev-in-proc-bus-input-devices-data
and
http://stackoverflow.com/questions/29678011/determine-linux-keyboard-events-device

That approach might have to be modified a bit in case multiple keyboards are attached (maybe starting a kloak instance for each one?).

Yes, this is definitely something I can work on. I'll probably build this directly into kloak, such that the devices default to something sensible. This way, it can still be used without package installation.

Should be fixed. Current solution is to select the first /dev/input/event* device that supports at least N KEY_* events, a good indication that the device is a standard keyboard (and not a power button, joystick, etc). Currently, N is default to 20 by #define NUM_SUPPORTED_KEYS_THRESH.

Fixed in v0.2 release. Tested on latest Whonix and Ubuntu.