From e96a13a11cedec63d56d2544626f222726e687c4 Mon Sep 17 00:00:00 2001 From: Octavia Togami Date: Fri, 29 Jan 2021 12:56:01 -0800 Subject: [PATCH] Map NumpadEnter on X11 --- CHANGELOG.md | 1 + src/platform_impl/linux/x11/events.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e59e278237..3113786ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - On Windows, fix bug causing mouse capture to not be released. - On Windows, fix fullscreen not preserving minimized/maximized state. - On Android, unimplemented events are marked as unhandled on the native event loop. +- On X11, the numpad's enter key is now mapped to `NumpadEnter`. # 0.24.0 (2020-12-09) diff --git a/src/platform_impl/linux/x11/events.rs b/src/platform_impl/linux/x11/events.rs index 0c02ca0c82..3bb45943a6 100644 --- a/src/platform_impl/linux/x11/events.rs +++ b/src/platform_impl/linux/x11/events.rs @@ -62,7 +62,7 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option { //ffi::XK_Num_Lock => VirtualKeyCode::Num_lock, //ffi::XK_KP_Space => VirtualKeyCode::Kp_space, //ffi::XK_KP_Tab => VirtualKeyCode::Kp_tab, - //ffi::XK_KP_Enter => VirtualKeyCode::Kp_enter, + ffi::XK_KP_Enter => VirtualKeyCode::NumpadEnter, //ffi::XK_KP_F1 => VirtualKeyCode::Kp_f1, //ffi::XK_KP_F2 => VirtualKeyCode::Kp_f2, //ffi::XK_KP_F3 => VirtualKeyCode::Kp_f3,