Skip to content

Repository files navigation

evdev

TestLuaRocksLua VersionsPlatformLicense

Lua bindings for Linux evdev input devices and /dev/uinput virtual devices.

Check out the documentation for guides and examples.

✨ Features

  • 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.

📦 Installation

luarocks install bluelua-evdev

🚀 Usage

localevdev=require"evdev"localdev=assert(evdev.device.open("/dev/input/event0"))
foreventindev:events() doifevdev.events.is_press(event) thenprint("Key pressed: " ..event. code)
endend

About

Lua bindings for Linux evdev and uinput input control

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Contributors

Languages