summaryrefslogtreecommitdiff
path: root/src/keyboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.py')
-rwxr-xr-xsrc/keyboard.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index 3a8f3537..ec1e7d0a 100755
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -115,6 +115,8 @@ class Keyboard(object):
# Disable the timeout
s.timeout(-1)
ret_list = get_char_list(s)
+ if not ret_list:
+ return ret_list
if len(ret_list) != 1:
if ret_list[-1] == '^M':
ret_list.pop(-1)