fix: winit does not consider space a named key anymore to comply with spec
This commit is contained in:
parent
b22d363f2c
commit
02149769ec
2 changed files with 4 additions and 3 deletions
|
|
@ -991,8 +991,6 @@ pub enum Code {
|
|||
ShiftLeft,
|
||||
/// <kbd>Shift</kbd> or <kbd>⇧</kbd>
|
||||
ShiftRight,
|
||||
/// <kbd> </kbd> (space)
|
||||
Space,
|
||||
/// <kbd>Tab</kbd> or <kbd>⇥</kbd>
|
||||
Tab,
|
||||
/// Japanese: <kbd>変</kbd> (henkan)
|
||||
|
|
|
|||
|
|
@ -682,7 +682,9 @@ pub fn keysym_to_key(keysym: u32) -> Key {
|
|||
keysyms::_3270_PrintScreen => Named::PrintScreen,
|
||||
keysyms::_3270_Enter => Named::Enter,
|
||||
|
||||
keysyms::space => Named::Space,
|
||||
keysyms::space => {
|
||||
return Key::Character(" ".into());
|
||||
}
|
||||
// exclam..Sinh_kunddaliya
|
||||
|
||||
// XFree86
|
||||
|
|
@ -1069,6 +1071,7 @@ pub fn key_to_keysym(
|
|||
(Some('*'), Location::Numpad) => keysyms::KP_Multiply,
|
||||
(Some('/'), Location::Numpad) => keysyms::KP_Divide,
|
||||
(Some('='), Location::Numpad) => keysyms::KP_Equal,
|
||||
(Some(' '), _) => keysyms::space,
|
||||
|
||||
(Some(c), _) => unsafe {
|
||||
let keysym =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue