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:
parent
b5af6bb266
commit
035eebb19a
3 changed files with 19 additions and 12 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue