fix: auto-load uinput kernel module in injector
Some checks are pending
Build & Release / Build & test (push) Waiting to run
Build & Release / Build .deb (push) Blocked by required conditions

This commit is contained in:
Khoa Vo 2026-07-01 16:06:00 +07:00
parent 58ff9e145e
commit 3c12aa3233

View file

@ -72,6 +72,10 @@ impl UinputInjector {
}
pub fn new(name: &str) -> Result<Self, Box<dyn std::error::Error>> {
// Ensure uinput kernel module is loaded before trying to open the device
let _ = std::process::Command::new("modprobe")
.args(["uinput"])
.output();
let file = OpenOptions::new()
.read(true)
.write(true)