summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-07-13 04:47:50 +0000
committerGitHub <noreply@github.com>2023-07-13 04:47:50 +0000
commitc8cbd0edc11754e1ef6de1401c5bdd872f444fa3 (patch)
treea53d551fa6b0f5546a0e07feb27699f838cdc0a3
parentfce7fda3ba56bb0d997d0c8c37196899e37aee25 (diff)
downloadalacritty-c8cbd0edc11754e1ef6de1401c5bdd872f444fa3.tar.gz
alacritty-c8cbd0edc11754e1ef6de1401c5bdd872f444fa3.zip
Fix `window.option_as_alt=Both`
Fixes #7077.
-rw-r--r--alacritty/src/input.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 867099a9..c73ae676 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -1028,11 +1028,12 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
#[cfg(target_os = "macos")]
fn alt_send_esc(&mut self) -> bool {
let option_as_alt = self.ctx.config().window.option_as_alt;
- option_as_alt == OptionAsAlt::Both
- || (option_as_alt == OptionAsAlt::OnlyLeft
- && self.ctx.modifiers().lalt_state() == ModifiersKeyState::Pressed)
- || (option_as_alt == OptionAsAlt::OnlyRight
- && self.ctx.modifiers().ralt_state() == ModifiersKeyState::Pressed)
+ self.ctx.modifiers().state().alt_key()
+ && (option_as_alt == OptionAsAlt::Both
+ || (option_as_alt == OptionAsAlt::OnlyLeft
+ && self.ctx.modifiers().lalt_state() == ModifiersKeyState::Pressed)
+ || (option_as_alt == OptionAsAlt::OnlyRight
+ && self.ctx.modifiers().ralt_state() == ModifiersKeyState::Pressed))
}
/// Attempt to find a binding and execute its action.