Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new mappings for numlock, numpadenter and numpadcomma on X11 #1937

Merged
merged 2 commits into from Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
# Unreleased

- On X11, add mappings for numpad comma, numpad enter, numlock and pause
blaind marked this conversation as resolved.
Show resolved Hide resolved

# 0.26.0 (2021-12-01)

- Update `raw-window-handle` to `v0.4`. This is _not_ a breaking change, we still implement `HasRawWindowHandle` from `v0.3`, see [rust-windowing/raw-window-handle#74](https://github.com/rust-windowing/raw-window-handle/pull/74). Note that you might have to run `cargo update -p raw-window-handle` after upgrading.
Expand Down
8 changes: 4 additions & 4 deletions src/platform_impl/linux/x11/events.rs
Expand Up @@ -9,7 +9,7 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
//ffi::XK_Linefeed => VirtualKeyCode::Linefeed,
//ffi::XK_Clear => VirtualKeyCode::Clear,
ffi::XK_Return => VirtualKeyCode::Return,
//ffi::XK_Pause => VirtualKeyCode::Pause,
ffi::XK_Pause => VirtualKeyCode::Pause,
//ffi::XK_Scroll_Lock => VirtualKeyCode::Scroll_lock,
//ffi::XK_Sys_Req => VirtualKeyCode::Sys_req,
ffi::XK_Escape => VirtualKeyCode::Escape,
Expand Down Expand Up @@ -59,10 +59,10 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
//ffi::XK_Break => VirtualKeyCode::Break,
//ffi::XK_Mode_switch => VirtualKeyCode::Mode_switch,
//ffi::XK_script_switch => VirtualKeyCode::Script_switch,
//ffi::XK_Num_Lock => VirtualKeyCode::Num_lock,
ffi::XK_Num_Lock => VirtualKeyCode::Numlock,
//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,
Expand All @@ -83,7 +83,7 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
ffi::XK_KP_Equal => VirtualKeyCode::NumpadEquals,
ffi::XK_KP_Multiply => VirtualKeyCode::NumpadMultiply,
ffi::XK_KP_Add => VirtualKeyCode::NumpadAdd,
//ffi::XK_KP_Separator => VirtualKeyCode::Kp_separator,
ffi::XK_KP_Separator => VirtualKeyCode::NumpadComma,
ffi::XK_KP_Subtract => VirtualKeyCode::NumpadSubtract,
ffi::XK_KP_Decimal => VirtualKeyCode::NumpadDecimal,
ffi::XK_KP_Divide => VirtualKeyCode::NumpadDivide,
Expand Down