From 2ef6e8c256fafb21810bca9817f43b3a109a3182 Mon Sep 17 00:00:00 2001 From: Adrian Hesketh Date: Mon, 5 Oct 2020 19:28:15 +0100 Subject: [PATCH] Handle 0x7F for backspace. --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 710d256..ff6696e 100644 --- a/main.go +++ b/main.go @@ -1472,6 +1472,11 @@ func (o *Input) Focus() (text string, ok bool) { o.CursorIndex-- o.Text = cut(o.Text, o.CursorIndex) } + case tcell.KeyBackspace2: + if o.CursorIndex > 0 { + o.CursorIndex-- + o.Text = cut(o.Text, o.CursorIndex) + } case tcell.KeyLeft: if o.CursorIndex > 0 { o.CursorIndex--