From 04bc475685df73ad4a335a678d911cba1f2a399d Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Fri, 23 Dec 2022 10:50:54 -0700 Subject: [PATCH] Patch from upstream to fix #63, fix #20 --- sohkd/src/uinput.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sohkd/src/uinput.rs b/sohkd/src/uinput.rs index 53cfec8a..feb20986 100644 --- a/sohkd/src/uinput.rs +++ b/sohkd/src/uinput.rs @@ -3,6 +3,12 @@ use evdev::{ AttributeSet, Key, RelativeAxisType, SwitchType, }; +use nix::ioctl_none; +use std::fs::File; +use std::os::unix::io::AsRawFd; + +ioctl_none!(rfkill_noinput, b'R', 1); + pub fn create_uinput_device() -> Result> { let mut keys = AttributeSet::::new(); for key in get_all_keys() { @@ -14,6 +20,21 @@ pub fn create_uinput_device() -> Result