โจ๏ธ Kinput
Low-level Rust library for input injection and global key capture on Linux.
Creates virtual devices and captures global input events directly via the kernel subsystem, operating independently of any graphical environment or display server.
โจ Features
- ๐ง Kernel-Level: Native virtual device management.
- โจ๏ธ Full Input Support: Keyboard and mouse (relative/absolute) events injection.
- ๐ง Global Capture: Reads events from physical devices regardless of window focus.
- ๐ซ Headless: No dependencies on X11, Wayland, or compositors.
- โก Minimal API: Simple, idiomatic Rust interface.
๐ Usage
Injection
use ;
Capture
use ;
๐ง Non-Root Setup
Run this script to configure permissions and use the library without sudo.
#!/bin/bash
MODULE_GROUP=
if [; then
else
RULE_FILE="/etc/udev/rules.d/99-uinput.rules"
RULE_CONTENT="KERNEL==\"uinput\", MODE=\"0660\", GROUP=\"input\""
|
fi
Note: A system logout/login is required for changes to take effect.
๐ฏ Scope
- ๐ค Bots & Automation
- ๐งช Automated Testing
- โฟ Accessibility Tooling
- ๐ฎ Device Emulation