mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-26 03:36:32 +11:00
Map XK_Caps_Lock to VirtualKeyCode::Capital (#1864)
This allows applications to handle events for the caps lock key under X11
This commit is contained in:
parent
64c1d4c5bb
commit
8646cbc9f5
2 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre
|
||||||
|
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- On X11, fix events for caps lock key not being sent
|
||||||
- Build docs on `docs.rs` for iOS and Android as well.
|
- Build docs on `docs.rs` for iOS and Android as well.
|
||||||
- **Breaking:** Removed the `WindowAttributes` struct, since all its functionality is accessible from `WindowBuilder`.
|
- **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.
|
- Added `WindowBuilder::transparent` getter to check if the user set `transparent` attribute.
|
||||||
|
|
|
@ -161,7 +161,7 @@ pub fn keysym_to_element(keysym: libc::c_uint) -> Option<VirtualKeyCode> {
|
||||||
ffi::XK_Shift_R => VirtualKeyCode::RShift,
|
ffi::XK_Shift_R => VirtualKeyCode::RShift,
|
||||||
ffi::XK_Control_L => VirtualKeyCode::LControl,
|
ffi::XK_Control_L => VirtualKeyCode::LControl,
|
||||||
ffi::XK_Control_R => VirtualKeyCode::RControl,
|
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_Shift_Lock => VirtualKeyCode::Shift_lock,
|
||||||
//ffi::XK_Meta_L => VirtualKeyCode::Meta_l,
|
//ffi::XK_Meta_L => VirtualKeyCode::Meta_l,
|
||||||
//ffi::XK_Meta_R => VirtualKeyCode::Meta_r,
|
//ffi::XK_Meta_R => VirtualKeyCode::Meta_r,
|
||||||
|
|
Loading…
Add table
Reference in a new issue