aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2024-03-21 08:00:06 +0400
committerChristian Duerr <contact@christianduerr.com>2024-03-24 18:50:55 +0100
commit889a3267380e33530ab7a8590937fff3ff6b66d5 (patch)
tree48262a084ac01c04c00a40abd1c0c0e22fdde95c
parente98f052e64c60bab6ad3cbad8e314e991d2e272b (diff)
downloadalacritty-889a3267380e33530ab7a8590937fff3ff6b66d5.tar.gz
alacritty-889a3267380e33530ab7a8590937fff3ff6b66d5.zip
Fix kitty encoding used for char input without text
On Windows some key combinations for regular text input, like Ctrl+1 don't have any text attached, so they were generating the kitty escape sequence even when they shouldn't.
-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 986d90b3..631e6cec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Config keys are available under proper names
- Build failure when compiling with x11 feature on NetBSD
- Hint `Select` action selecting the entire line for URL escapes
+- Kitty encoding used for regular keys when they don't carry text
### Changed
diff --git a/alacritty/src/input/keyboard.rs b/alacritty/src/input/keyboard.rs
index b7635bd9..afb23eb5 100644
--- a/alacritty/src/input/keyboard.rs
+++ b/alacritty/src/input/keyboard.rs
@@ -347,7 +347,7 @@ impl SequenceBuilder {
associated_text: Option<&str>,
) -> Option<SequenceBase> {
let character = match key.logical_key.as_ref() {
- Key::Character(character) => character,
+ Key::Character(character) if self.kitty_seq => character,
_ => return None,
};