From 5c748a922e7ee713ba31b4d5232e99fd9a450670 Mon Sep 17 00:00:00 2001 From: Pedro Casotti Date: Tue, 17 Dec 2024 12:08:49 -0300 Subject: [PATCH] feat(test) add test for combo keycode conversion --- rmk/src/via/keycode_convert.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rmk/src/via/keycode_convert.rs b/rmk/src/via/keycode_convert.rs index d8c074f2..307f0e84 100644 --- a/rmk/src/via/keycode_convert.rs +++ b/rmk/src/via/keycode_convert.rs @@ -328,6 +328,13 @@ mod test { ), from_via_keycode(via_keycode) ); + + // ComboOff + let via_keycode = 0x7C51; + assert_eq!( + KeyAction::Single(Action::Key(KeyCode::ComboOff)), + from_via_keycode(via_keycode) + ); } #[test] @@ -417,5 +424,9 @@ mod test { ModifierCombination::new_from(false, false, true, true, true), ); assert_eq!(0x2704, to_via_keycode(a)); + + // ComboOff + let a = KeyAction::Single(Action::Key(KeyCode::ComboOff)); + assert_eq!(0x7C51, to_via_keycode(a)); } }