mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 02:25:28 +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:
parent
b0ceebbc2d
commit
eaab3d08ae
@ -307,6 +307,9 @@ impl super::TermWindow {
|
|||||||
is_down: bool,
|
is_down: bool,
|
||||||
key_event: Option<&KeyEvent>,
|
key_event: Option<&KeyEvent>,
|
||||||
) -> bool {
|
) -> 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 {
|
if is_down && !leader_active {
|
||||||
// Check to see if this key-press is the leader activating
|
// Check to see if this key-press is the leader activating
|
||||||
if let Some(duration) = self.input_map.is_leader(&keycode, raw_modifiers) {
|
if let Some(duration) = self.input_map.is_leader(&keycode, raw_modifiers) {
|
||||||
|
Loading…
Reference in New Issue
Block a user