Turning a Keyboard into a Mouse with Libevdev

This web content provides a tutorial on how to use the libevdev library in C++ to capture input events from a USB keypad and synthesize new events for a virtual mouse device. The tutorial includes code examples for enumerating devices, grabbing inputs from the keypad, running external programs on keypress, creating a virtual mouse, and moving the virtual mouse based on keypad input. The author highlights the ability to turn any keyboard into a macro keyboard and run commands as the user, rather than as root. They also mention the use of capabilities to give the program the ability to change its group ID.

https://suricrasia.online/blog/turning-a-keyboard-into/

To top