mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 02:35:20 +00:00
better backspace detection
This commit is contained in:
parent
3350229263
commit
ea1cb0a613
1 changed files with 2 additions and 1 deletions
|
@ -181,7 +181,8 @@ class ElectrumGui:
|
||||||
|
|
||||||
|
|
||||||
def edit_str(self, target, c, is_num=False):
|
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]
|
target = target[:-1]
|
||||||
elif not is_num or curses.unctrl(c) in '0123456789.':
|
elif not is_num or curses.unctrl(c) in '0123456789.':
|
||||||
target += curses.unctrl(c)
|
target += curses.unctrl(c)
|
||||||
|
|
Loading…
Add table
Reference in a new issue