Lua bindings for Linux evdev input devices and /dev/uinput virtual devices.
Check out the documentation for guides and examples.
- Device Discovery: List and search for connected input devices by name, path, or physical location.
- Event Stream: Read kernel input events with high-resolution timestamps.
- Virtual Devices: Emulate any hardware input device (mouse, keyboard, gamepad) programmatically via uinput.
- Event Selector: Poll multiple devices concurrently in a single non-blocking event loop.
- Multiple Lua Versions: Compatible with LuaJIT, Lua 5.1, 5.2, 5.3, 5.4, and 5.5.
luarocks install bluelua-evdevlocalevdev=require"evdev"localdev=assert(evdev.device.open("/dev/input/event0"))
foreventindev:events() doifevdev.events.is_press(event) thenprint("Key pressed: " ..event. code)
endend