fix: auto-load uinput kernel module in injector
This commit is contained in:
parent
58ff9e145e
commit
3c12aa3233
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue