summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Holland <william.holland@codethink.co.uk>2015-06-07 13:51:27 +0100
committerWilliam Holland <william.holland@codethink.co.uk>2015-06-07 13:51:27 +0100
commitc90d8291194fb80a55c822554f67fb45ba6fc13f (patch)
treedb08b8639721f6cc96ca42e06e17cc26350bd93f
parentb239576bac5e764fe6defdbf2b567de7050c67f7 (diff)
downloadkeyboard-python-c90d8291194fb80a55c822554f67fb45ba6fc13f.tar.bz2
Remove duplicate definition of ESC
-rw-r--r--keyboardpython/__init__.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/keyboardpython/__init__.py b/keyboardpython/__init__.py
index b0dc79c..8d230bf 100644
--- a/keyboardpython/__init__.py
+++ b/keyboardpython/__init__.py
@@ -1,7 +1,5 @@
from key import *
-ESC = '\033'
-
def get_repeat():
''' try and get the repeat delay and rate from X '''
import subprocess
@@ -74,7 +72,7 @@ def getkey(fd='default',timeout=49,buffersize=6):
to_return = str()
timeout = float(timeout) / 1000
c = os.read(fd,buffersize)
- if ESC not in c: return key.parse_code(c)
+ if key.ESC not in c: return key.parse_code(c)
t = termios.tcgetattr(fd)
cc = t[-1]
cc[termios.VMIN] = 0