This is alpha quality. It's probably not usable for consumption, but might be helpful.
This is a pure Go library that can be used to send/recieve data from a keyboard device in Linux. Besides being able to read/write raw key events, it has some additional helper functions for translating these raw key events into the character to be displayed.
It uses a /dev/input/eventX
character special device representing a keyboard directly. No libevdev or other dependancies.
- To use this library, your program will need to run with root privileges. This is a requirement of accessing
/dev/input/eventX
devices.
- Linux Input Subsystem kernel documentation
- Linux input event codes
- X11 keysym definitions