From 8dab8a0a039fe1f3dd98fc62ac97d2f1c089793a Mon Sep 17 00:00:00 2001 From: lesleyrs Date: Tue, 29 Nov 2022 23:31:18 +0100 Subject: Add shift-backspace keybind alias for backspace (#4937) When the Kitty Keyboard Protocol is enabled, S-backspace is distinguished from backspace with no modifiers. This is awkward when typing because it's very easy to accidentally hold shift and press backspace temporarily when typing capital letters. Kakoune (which is also a Kitty Keyboard Protocol application) treats S-backspace as backspace too: https://github.com/mawww/kakoune/blob/3150e9b3cd8e61d9bc68245d67822614d4376cf4/src/input_handler.cc#L1275 --- helix-term/src/ui/prompt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index f438231f..35ae8c2a 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -516,7 +516,7 @@ impl Component for Prompt { alt!('d') | alt!(Delete) | ctrl!(Delete) => self.delete_word_forwards(cx.editor), ctrl!('k') => self.kill_to_end_of_line(cx.editor), ctrl!('u') => self.kill_to_start_of_line(cx.editor), - ctrl!('h') | key!(Backspace) => { + ctrl!('h') | key!(Backspace) | shift!(Backspace) => { self.delete_char_backwards(cx.editor); (self.callback_fn)(cx, &self.line, PromptEvent::Update); } -- cgit v1.2.3-70-g09d2