summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Holland <william.holland@codethink.co.uk>2015-06-03 13:56:09 +0100
committerWilliam Holland <william.holland@codethink.co.uk>2015-06-03 13:56:09 +0100
commit7bede663c43c27b329a0cd0588dc08441b64c03f (patch)
treebc9acff4d3961c72535cebfa5ecffadc3adb0292
parent9d8a8e9fd7ccfeef152b0d20045e699d3342ba5f (diff)
downloadkeyboard-python-7bede663c43c27b329a0cd0588dc08441b64c03f.tar.bz2
Add dict of my escape codes
-rw-r--r--keyboardpython/key_codes.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/keyboardpython/key_codes.py b/keyboardpython/key_codes.py
new file mode 100644
index 0000000..b653c5e
--- /dev/null
+++ b/keyboardpython/key_codes.py
@@ -0,0 +1,32 @@
+_key_codes = {
+ 'Backspace' : ['\b'],
+ 'CR' : ['\r'],
+ 'Del' : ['^[[3~'],
+ 'Down' : ['^[[B'],
+ 'End' : ['^[OF'],
+ 'Enter' : ['\n'],
+ 'Erase' : ['\x7f'],
+ 'Escape' : ['\x1b'],
+ 'F1' : ['^[OP'],
+ 'F2' : ['^[OQ'],
+ 'F3' : ['^[OR'],
+ 'F4' : ['^[OS'],
+ 'F5' : ['^[[15~'],
+ 'F6' : ['^[[17~'],
+ 'F7' : ['^[[18~'],
+ 'F8' : ['^[[19~'],
+ 'F9' : ['^[[20~'],
+ 'F10' : ['^[[21~'],
+ 'F11' : ['^[[23~'],
+ 'F12' : ['^[[24~'],
+ 'Home' : ['^[OH'],
+ 'Insert' : ['^[[2~'],
+ 'Left' : ['^[[D'],
+ 'PageDown' : ['^[[6~'],
+ 'PageUp' : ['^[[5~'],
+ 'Right' : ['^[[C'],
+ 'Space' : [' '],
+ 'Tab' : ['\t'],
+ 'Up' : ['^[[A'],
+ 'vTab' : ['\v'],
+ }