1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00

x11/wayland: unbreak key bindings when capslock or numlock are active

Treat these similarly to positional key modifiers, but handle them
centrally to avoid broader issues with eg: interpreting ESC in
the command palette.
This commit is contained in:
Wez Furlong 2023-04-10 10:04:19 -07:00
parent b0ceebbc2d
commit eaab3d08ae
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -307,6 +307,9 @@ impl super::TermWindow {
is_down: bool,
key_event: Option<&KeyEvent>,
) -> bool {
// We don't allow caps lock or num lock to influence key resolution at the GUI layer.
let raw_modifiers = raw_modifiers - (Modifiers::CAPS_LOCK | Modifiers::NUM_LOCK);
if is_down && !leader_active {
// Check to see if this key-press is the leader activating
if let Some(duration) = self.input_map.is_leader(&keycode, raw_modifiers) {