From 55198bc5ecc2e46907ad67a62f5ccae5c662d0c7 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 24 Jul 2011 05:06:59 +0200 Subject: fixed backspace bug on krebs... hopefully? --- cholerab/cholerab-live/view.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cholerab') diff --git a/cholerab/cholerab-live/view.py b/cholerab/cholerab-live/view.py index 01b53b8c..6a75f655 100644 --- a/cholerab/cholerab-live/view.py +++ b/cholerab/cholerab-live/view.py @@ -40,12 +40,13 @@ class CursesView(threading.Thread): while self.running: c = self.scr.getch() #get_char(self.scr) #TODO UTF8 here, get_wch not yet implemented + log.debug("Pressed : %d" % c) if c == KEY_LEFT : self.x -=1 elif c == KEY_RIGHT : self.x +=1 elif c == KEY_UP : self.y -=1 elif c == KEY_DOWN : self.y +=1 elif c == ord('q') : self.stop() - elif c == 127: + elif c == 127 or c == KEY_BACKSPACE: log.info('backspace pressed') self.x -=1; self.x,self.y = try_move(self.x,self.y) -- cgit v1.2.3