aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2024-03-24 18:06:51 +0400
committerKirill Chibisov <contact@kchibisov.com>2024-03-24 18:10:24 +0400
commit8a78381612953a96a50ed343ad444d9c16c72ee2 (patch)
treee9011e9b4354659951bd3247746e4a7a2e00eb4e
parentcef95324c9e2572a50e2d2334cbe2ba3641a12a8 (diff)
downloadalacritty-alt-esc-unicode.tar.gz
alacritty-alt-esc-unicode.zip
Send ESC with Alt for unicode inputalt-esc-unicode
Make `Alt` send `ESC` for unicode input the way it's done for ASCII. Previously it was disabled because of macOS, however on macOS we're using the `option_as_alt` setting, which solves the original issue. The `Alt` prefixing is still disabled for the unicode strings, like when they come from the compose input. Fixes #7852.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/input/keyboard.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbbd4bb8..d61e0e9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
+- Pressing `Alt` with unicode input will now add `ESC` like for ASCII input
- No unused-key warnings will be emitted for OS-specific config keys
- Use built-in font for sextant symbols from `U+1FB00` to `U+1FB3B`
- Kitty encoding is not used anymore for uncommon keys unless the protocol enabled
diff --git a/alacritty/src/input/keyboard.rs b/alacritty/src/input/keyboard.rs
index afb23eb5..b4c35741 100644
--- a/alacritty/src/input/keyboard.rs
+++ b/alacritty/src/input/keyboard.rs
@@ -126,7 +126,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
self.ctx.modifiers().state().alt_key()
}
},
- _ => text.len() == 1 && alt_send_esc,
+ _ => alt_send_esc && text.chars().count() == 1,
}
}