From ea1cb0a6130c970e8c322bff13ad07c4de989a01 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 26 Jul 2013 05:28:41 +0200 Subject: [PATCH] better backspace detection --- gui/gui_text.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/gui_text.py b/gui/gui_text.py index 6387f21db..2dd8c9c09 100644 --- a/gui/gui_text.py +++ b/gui/gui_text.py @@ -181,7 +181,8 @@ class ElectrumGui: def edit_str(self, target, c, is_num=False): - if c==263 and target: + # detect backspace + if c in [8, 127, 263] and target: target = target[:-1] elif not is_num or curses.unctrl(c) in '0123456789.': target += curses.unctrl(c)