wezterm: normalize configured keys
To avoid confusing behavior, normalize the configured keys
in the same way that we normalize key presses.
In other words, this:
```lua
{
key = "y",
mods = "CTRL|SHIFT",
action = "Copy",
}
```
is treated as if you wrote:
```lua
{
key = "Y",
mods = "CTRL",
action = "Copy",
}
```
refs: https://github.com/wez/wezterm/issues/372
This commit is contained in:
1 parent
35880cf4b1
commit
694fec0d5d
1 file changed
+2
-1
+2
-1
@@ -992,7 +992,8 @@ impl Config {
|
||||
let mut map = HashMap::new();
|
||||
|
||||
for k in &self.keys {
|
||||
map.insert((k.key.clone(), k.mods), k.action.clone());
|
||||
let (key, mods) = k.key.normalize_shift(k.mods);
|
||||
map.insert((key, mods), k.action.clone());
|
||||
}
|
||||
|
||||
Ok(map)
|
||||
|
||||
Reference in new issue
Block a user