From 5dd9dc4c1846d8d6be3a8ad5fa50b6e481333c77 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 3 Jan 2026 14:32:19 +0100 Subject: [PATCH] Support ctrl-h as a synonym for backspace in editor Typing ctrl-h instead of backspace used to work with the old tcell version, because in the legacy xterm protocol they are indistinguishable. With the new version and terminals that support the kitty protocol, ctrl-h is detected as a separate key. However, some users prefer to type ctrl-h instead of backspace, so keep supporting it even with the new protocol. --- edit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit.go b/edit.go index 7abc7ed..ac1827a 100644 --- a/edit.go +++ b/edit.go @@ -28,7 +28,7 @@ func SimpleEditor(v *View, key Key, ch rune, mod Modifier) bool { case (key == KeyBackspace || key == KeyBackspace2) && (mod&ModAlt) != 0, key == KeyCtrlW: v.TextArea.BackSpaceWord() - case key == KeyBackspace || key == KeyBackspace2: + case key == KeyBackspace || key == KeyBackspace2 || key == KeyCtrlH: v.TextArea.BackSpaceChar() case key == KeyCtrlD || key == KeyDelete: v.TextArea.DeleteChar()