Skip to content

Commit

Permalink
Add some missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Supreeeme committed Dec 9, 2023
1 parent 83b0372 commit 1b1ebc2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/steam_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
];

0 comments on commit 1b1ebc2

Please sign in to comment.