mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Use linux scancode values for KeyCodeExtScancode
Old winit was using linux scancodes, so this should make it backward compatible with itself.
This commit is contained in:
@@ -656,11 +656,11 @@ impl KeyEventExtModifierSupplement for KeyEvent {
|
||||
|
||||
impl KeyCodeExtScancode for KeyCode {
|
||||
fn from_scancode(scancode: u32) -> KeyCode {
|
||||
common::keymap::raw_keycode_to_keycode(scancode)
|
||||
common::keymap::scancode_to_keycode(scancode)
|
||||
}
|
||||
|
||||
fn to_scancode(self) -> Option<u32> {
|
||||
common::keymap::keycode_to_raw(self)
|
||||
common::keymap::keycode_to_scancode(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user