mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
macos: send_composed_key_when_X_alt_is_pressed now ignores other mods
For reasons that I cannot remember, I made `send_composed_key_when_left_alt_is_pressed` and `send_composed_key_when_right_alt_is_pressed` only take effect if only the ALT modifiers were pressed. If SHIFT or CTRL were pressed, then the purpose of `send_composed_key_when_left_alt_is_pressed` was bypassed. This commit scopes this back to the alt mods - other kinds of mods don't affect this functionality any more. refs: https://github.com/wez/wezterm/issues/1826
This commit is contained in:
parent
6cad4c35e9
commit
0cfdf0999c
@ -2150,12 +2150,10 @@ impl WindowView {
|
||||
modifiers
|
||||
};
|
||||
|
||||
let only_alt = (modifiers & !(Modifiers::LEFT_ALT | Modifiers::RIGHT_ALT | Modifiers::ALT))
|
||||
== Modifiers::NONE;
|
||||
let only_left_alt =
|
||||
(modifiers & !(Modifiers::LEFT_ALT | Modifiers::ALT)) == Modifiers::NONE;
|
||||
let only_right_alt =
|
||||
(modifiers & !(Modifiers::RIGHT_ALT | Modifiers::ALT)) == Modifiers::NONE;
|
||||
let alt_mods = Modifiers::LEFT_ALT | Modifiers::RIGHT_ALT | Modifiers::ALT;
|
||||
let only_alt = (modifiers & alt_mods) == Modifiers::ALT;
|
||||
let only_left_alt = (modifiers & alt_mods) == (Modifiers::LEFT_ALT | Modifiers::ALT);
|
||||
let only_right_alt = (modifiers & alt_mods) == (Modifiers::RIGHT_ALT | Modifiers::ALT);
|
||||
|
||||
// Also respect `send_composed_key_when_(left|right)_alt_is_pressed` configs
|
||||
// when `use_ime` is true.
|
||||
|
Loading…
Reference in New Issue
Block a user