Skip to content

Commit

Permalink
feat(test) add test for combo keycode conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
pcasotti committed Dec 17, 2024
1 parent 5e79689 commit 5c748a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rmk/src/via/keycode_convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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));
}
}

0 comments on commit 5c748a9

Please sign in to comment.