diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-07-31 19:03:15 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-07-31 19:03:15 +0200 |
commit | a93069e3a0d91e0065b056eb8383d7b91edee0ff (patch) | |
tree | 3333695be1ef5aed898b7021348c9fb1a255c483 | |
parent | c2ba5388a5cf85cc8d4424d41f5ad0dab51c383b (diff) | |
download | poezio-a93069e3a0d91e0065b056eb8383d7b91edee0ff.tar.gz poezio-a93069e3a0d91e0065b056eb8383d7b91edee0ff.tar.bz2 poezio-a93069e3a0d91e0065b056eb8383d7b91edee0ff.tar.xz poezio-a93069e3a0d91e0065b056eb8383d7b91edee0ff.zip |
Fix the crash on Escape key
-rw-r--r-- | src/keyboard.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/keyboard.py b/src/keyboard.py index f3dd14db..5fee7444 100644 --- a/src/keyboard.py +++ b/src/keyboard.py @@ -63,6 +63,9 @@ def read_char(s, timeout=1000): continue if first == 27: second = read_char(s, 0) + if second is None: # if escape was pressed, a second char + # has to be read. But it timed out. + return None res = 'M-%s' % (second[0],) ret_list.append(res) (first, char) = get_next_byte(s) |