la touche suppr fonctionne
This commit is contained in:
parent
6429b30f91
commit
40f3dad56b
2 changed files with 6 additions and 2 deletions
|
@ -155,7 +155,10 @@ class Gui(object):
|
||||||
elif ord(key) == 8 or ord(key) == 127:
|
elif ord(key) == 8 or ord(key) == 127:
|
||||||
self.window.input.key_backspace()
|
self.window.input.key_backspace()
|
||||||
else:
|
else:
|
||||||
if ord(key) > 190 and ord(key) < 225:
|
if ord(key) == 27 and ord(stdscr.getkey()) == 91 \
|
||||||
|
and ord(stdscr.getkey()) == 51: # FIXME: ugly ugly workaroung.
|
||||||
|
self.window.input.key_dc()
|
||||||
|
elif ord(key) > 190 and ord(key) < 225:
|
||||||
key = key+stdscr.getkey()
|
key = key+stdscr.getkey()
|
||||||
elif ord(key) == 226:
|
elif ord(key) == 226:
|
||||||
key = key+stdscr.getkey()
|
key = key+stdscr.getkey()
|
||||||
|
|
|
@ -183,7 +183,8 @@ class Input(Win):
|
||||||
return
|
return
|
||||||
(y, x) = self.win.getyx()
|
(y, x) = self.win.getyx()
|
||||||
self.text = self.text[:self.pos]+self.text[self.pos+1:]
|
self.text = self.text[:self.pos]+self.text[self.pos+1:]
|
||||||
self.win.delch(y, x-1)
|
self.win.delch(y, x)
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
def key_up(self):
|
def key_up(self):
|
||||||
self.win.clear()
|
self.win.clear()
|
||||||
|
|
Loading…
Reference in a new issue