From 889a3267380e33530ab7a8590937fff3ff6b66d5 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Thu, 21 Mar 2024 08:00:06 +0400 Subject: [PATCH] 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. --- CHANGELOG.md | 1 + alacritty/src/input/keyboard.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 { let character = match key.logical_key.as_ref() { - Key::Character(character) => character, + Key::Character(character) if self.kitty_seq => character, _ => return None, };