Skip to content

Commit

Permalink
Map XK_Caps_Lock to VirtualKeyCode::Capital (#1864)
Browse files Browse the repository at this point in the history
This allows applications to handle events for the caps lock key under X11
  • Loading branch information
Aaron1011 authored Jun 23, 2022
1 parent 64c1d4c commit 8646cbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre

# Unreleased

- On X11, fix events for caps lock key not being sent
- Build docs on `docs.rs` for iOS and Android as well.
- **Breaking:** Removed the `WindowAttributes` struct, since all its functionality is accessible from `WindowBuilder`.
- Added `WindowBuilder::transparent` getter to check if the user set `transparent` attribute.
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/linux/x11/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
ffi::XK_Shift_R => VirtualKeyCode::RShift,
ffi::XK_Control_L => VirtualKeyCode::LControl,
ffi::XK_Control_R => VirtualKeyCode::RControl,
//ffi::XK_Caps_Lock => VirtualKeyCode::Caps_lock,
ffi::XK_Caps_Lock => VirtualKeyCode::Capital,
//ffi::XK_Shift_Lock => VirtualKeyCode::Shift_lock,
//ffi::XK_Meta_L => VirtualKeyCode::Meta_l,
//ffi::XK_Meta_R => VirtualKeyCode::Meta_r,
Expand Down

0 comments on commit 8646cbc

Please sign in to comment.