From adc65535739abcc07472e3a3397ea77a7369cce6 Mon Sep 17 00:00:00 2001 From: Maximilian Hantsch Date: Mon, 19 Feb 2024 21:52:22 +0100 Subject: [PATCH 1/4] added support for keyd virtual keyboard --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 77e5813..e76829e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,7 +99,7 @@ fn main() -> anyhow::Result<()> { // Filter devices so that only the Framework's builtin touchpad and keyboard are listened // to. Since we don't support hotplug, listening on USB devices wouldn't work reliably. match device.name() { - Some("PIXA3854:00 093A:0274 Touchpad" | "AT Translated Set 2 keyboard") => { + Some("PIXA3854:00 093A:0274 Touchpad" | "AT Translated Set 2 keyboard" | "keyd virtual keyboard" ) => { let act = act.clone(); thread::spawn(move || -> io::Result<()> { let name = device.name(); From 2cec0ef469bc2ec4dcadb7d3a5c5db59daf62771 Mon Sep 17 00:00:00 2001 From: Maximilian Hantsch Date: Tue, 20 Feb 2024 11:32:32 +0100 Subject: [PATCH 2/4] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9f28839..c3b33ab 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ [Framework]: https://frame.work/ +This is a fork of the original `keylightd` to make it compatible with systems that use [keyd]. + +[keyd]: https://github.com/rvaiya/keyd + ## Installation To install from source, clone the repository and run: From f6185c71341b5cd59a7f2cbcca0ddd82d7581b98 Mon Sep 17 00:00:00 2001 From: Maximilian Hantsch Date: Tue, 10 Sep 2024 22:13:11 +0200 Subject: [PATCH 3/4] add kanata to known event devices to listen to --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e76829e..bab7d12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,8 +98,9 @@ fn main() -> anyhow::Result<()> { for (path, mut device) in evdev::enumerate() { // Filter devices so that only the Framework's builtin touchpad and keyboard are listened // to. Since we don't support hotplug, listening on USB devices wouldn't work reliably. + //log::info!("checking device {:#?}", device.name()); match device.name() { - Some("PIXA3854:00 093A:0274 Touchpad" | "AT Translated Set 2 keyboard" | "keyd virtual keyboard" ) => { + Some("PIXA3854:00 093A:0274 Touchpad" | "AT Translated Set 2 keyboard" | "keyd virtual keyboard" | "kanata" ) => { let act = act.clone(); thread::spawn(move || -> io::Result<()> { let name = device.name(); @@ -131,12 +132,13 @@ fn main() -> anyhow::Result<()> { loop { let guard = act.last_activity.lock().unwrap(); let last = *guard; - let (_, result) = act + let (unneeded, result) = act .condvar .wait_timeout_while(guard, Duration::from_secs(args.timeout.into()), |instant| { *instant == last }) .unwrap(); + drop(unneeded); let new_state = !result.timed_out(); if state != Some(new_state) { log::info!("activity state changed: {state:?} -> {new_state}"); From 95a8b1a628e0f9f82bc8d7e145c0aa62b6d90581 Mon Sep 17 00:00:00 2001 From: Maximilian Hantsch Date: Thu, 10 Oct 2024 09:18:48 +0200 Subject: [PATCH 4/4] Add reference to kanata to README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c3b33ab..07697d0 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,10 @@ [Framework]: https://frame.work/ -This is a fork of the original `keylightd` to make it compatible with systems that use [keyd]. +This is a fork of the original `keylightd` to make it compatible with systems that use [keyd] or [kanata]. [keyd]: https://github.com/rvaiya/keyd +[kanata]: https://github.com/jtroo/kanata ## Installation