From c85f3d1fc11dcb090fbe5f68e8241b25259543e1 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 20 Mar 2024 14:44:52 +0400 Subject: 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 7dadf41c..cbbd4bb8 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, }; -- cgit v1.2.3-54-g00ecf