From 1b1ebc285387e3d207c852af8199e42066577065 Mon Sep 17 00:00:00 2001 From: Shawn Wallace Date: Fri, 8 Dec 2023 23:05:45 -0500 Subject: [PATCH] Add some missing keys --- src/lib.rs | 4 ++++ src/steam_keys.rs | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ae698b2..da29827 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,6 +70,10 @@ pub extern "C" fn XTestFakeKeyEvent( 156 => Key::KEY_TAB, // I have no idea where this comes from keycode => Key::new((keycode - 8) as u16) }; + + #[cfg(debug_assertions)] + println!("emitting keycode {key:?}"); + dev.emit(&[InputEvent::new_now(EventType::KEY, key.0, is_press as i32)]) .unwrap(); 1 diff --git a/src/steam_keys.rs b/src/steam_keys.rs index 8440d90..a2b9b92 100644 --- a/src/steam_keys.rs +++ b/src/steam_keys.rs @@ -87,6 +87,9 @@ pub const KEYS: &[Key] = &[ Key::KEY_STOP, Key::KEY_NEXT, Key::KEY_PREVIOUS, + Key::KEY_PREVIOUSSONG, + Key::KEY_NEXTSONG, + Key::KEY_PLAYPAUSE, Key::KEY_INSERT, Key::KEY_HOME, Key::KEY_PAGEUP, @@ -119,5 +122,8 @@ pub const KEYS: &[Key] = &[ Key::KEY_KPENTER, Key::KEY_KP0, - Key::KEY_KPDOT + Key::KEY_KPDOT, + Key::KEY_KPLEFTPAREN, + Key::KEY_KPRIGHTPAREN, + Key::KEY_102ND, // Output by < (less than key) ];