Add additional numpad key mappings (#805)
* Add additional numpad key mappings Since some platforms have already used the existing `Add`, `Subtract` and `Divide` codes to map numpad keys, the X11 and Wayland platform has been updated to achieve parity between platforms. On macOS only the `Subtract` numpad key had to be added. Since the numpad key is different from the normal keys, an alternative option would be to add new `NumpadAdd`, `NumpadSubtract` and `NumpadDivide` actions, however I think in this case it should be fine to map them to the same virtual key code. * Add Numpad PageUp/Down, Home and End on Wayland
This commit is contained in:
parent
9874181ccd
commit
20b09c4514
4 changed files with 14 additions and 3 deletions
|
|
@ -82,11 +82,11 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
|
|||
ffi::XK_KP_Delete => events::VirtualKeyCode::Delete,
|
||||
ffi::XK_KP_Equal => events::VirtualKeyCode::NumpadEquals,
|
||||
//ffi::XK_KP_Multiply => events::VirtualKeyCode::NumpadMultiply,
|
||||
//ffi::XK_KP_Add => events::VirtualKeyCode::NumpadAdd,
|
||||
ffi::XK_KP_Add => events::VirtualKeyCode::Add,
|
||||
//ffi::XK_KP_Separator => events::VirtualKeyCode::Kp_separator,
|
||||
//ffi::XK_KP_Subtract => events::VirtualKeyCode::NumpadSubtract,
|
||||
ffi::XK_KP_Subtract => events::VirtualKeyCode::Subtract,
|
||||
//ffi::XK_KP_Decimal => events::VirtualKeyCode::Kp_decimal,
|
||||
//ffi::XK_KP_Divide => events::VirtualKeyCode::NumpadDivide,
|
||||
ffi::XK_KP_Divide => events::VirtualKeyCode::Divide,
|
||||
ffi::XK_KP_0 => events::VirtualKeyCode::Numpad0,
|
||||
ffi::XK_KP_1 => events::VirtualKeyCode::Numpad1,
|
||||
ffi::XK_KP_2 => events::VirtualKeyCode::Numpad2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue