mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
input: fix ALT when used for the leader key
The issue here was that we'd try to match this: ``` key_event RawKeyEvent { key: Char('t'), modifiers: ALT | LEFT_ALT, phys_code: Some(T), raw_code: 17, repeat_count: 1, key_is_down: true, handled: Handled(false) } ``` which has mods=`ALT|LEFT_ALT` against `ALT` and would fail. We need to strip out the positional ALTs from the modifiers in order to successfully match. refs: https://github.com/wez/wezterm/issues/1958
This commit is contained in:
parent
6484b3adc0
commit
7858f652fb
@ -49,6 +49,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* Scrollbar stopped working after a lot of output scrolled outside of the scrollback limit. Thanks to [@davidrios](https://github.com/davidrios)! [#1866](https://github.com/wez/wezterm/pull/1866)
|
||||
* Windows: uncommitted IME composition could get stuck when switching input methods. [#1922](https://github.com/wez/wezterm/issues/1922)
|
||||
* OSC sequences, such as those that change the window or tab title, that accept a single string parameter will now join multiple parameters together. This allows window and tab titles to contain a semicolo. Thanks to [@kumattau](https://github.com/kumattau)! [#1939](https://github.com/wez/wezterm/pull/1939)
|
||||
* Unable to use `ALT` as a modifier for the `leader` key. [#1958](https://github.com/wez/wezterm/issues/1958)
|
||||
|
||||
### 20220408-101518-b908e2dd
|
||||
|
||||
|
@ -214,7 +214,7 @@ impl InputMap {
|
||||
|
||||
pub fn is_leader(&self, key: &KeyCode, mods: Modifiers) -> Option<std::time::Duration> {
|
||||
if let Some((leader_key, leader_mods, timeout)) = self.leader.as_ref() {
|
||||
if *leader_key == *key && *leader_mods == mods {
|
||||
if *leader_key == *key && *leader_mods == Self::remove_positional_alt(mods) {
|
||||
return Some(timeout.clone());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user