summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Holland <william.holland@codethink.co.uk>2015-06-04 22:08:29 +0100
committerWilliam Holland <william.holland@codethink.co.uk>2015-06-04 22:08:29 +0100
commita6024dc7c0c7793ba96c177f228b504704ad200d (patch)
treecebaf34385b3bc750cc9c0ddcc8d8843a8ffdd3f
parentc5f2500441c1d93c8a93a2bf1971bd7766b07d00 (diff)
downloadkeyboard-python-a6024dc7c0c7793ba96c177f228b504704ad200d.tar.bz2
Put all codes in one table
This makes it clearer for the would-be editor
-rw-r--r--keyboardpython/key_codes.py26
1 files changed, 21 insertions, 5 deletions
diff --git a/keyboardpython/key_codes.py b/keyboardpython/key_codes.py
index b653c5e..05651e2 100644
--- a/keyboardpython/key_codes.py
+++ b/keyboardpython/key_codes.py
@@ -1,4 +1,20 @@
-_key_codes = {
+key_codes = {
+ 'Alt Del' : ['^[[3;3~'],
+ 'Alt F1' : ['^[O1;3P'],
+ 'Alt F2' : ['^[O1;3Q'],
+ 'Alt F3' : ['^[O1;3R'],
+ 'Alt F4' : ['^[O1;3S'],
+ 'Alt F5' : ['^[[15;3~'],
+ 'Alt F6' : ['^[[17;3~'],
+ 'Alt F7' : ['^[[18;3~'],
+ 'Alt F8' : ['^[[19;3~'],
+ 'Alt F9' : ['^[[20;3~'],
+ 'Alt F10' : ['^[[21;3~'],
+ 'Alt F11' : ['^[[23;3~'],
+ 'Alt F12' : ['^[[24;3~'],
+ 'Alt Insert' : ['^[[2;3~'],
+ 'Alt PageDown' : ['^[[6;3~'],
+ 'Alt PageUp' : ['^[[5;3~'],
'Backspace' : ['\b'],
'CR' : ['\r'],
'Del' : ['^[[3~'],
@@ -7,10 +23,10 @@ _key_codes = {
'Enter' : ['\n'],
'Erase' : ['\x7f'],
'Escape' : ['\x1b'],
- 'F1' : ['^[OP'],
- 'F2' : ['^[OQ'],
- 'F3' : ['^[OR'],
- 'F4' : ['^[OS'],
+ 'F1' : ['^[OP','^[[11~'],
+ 'F2' : ['^[OQ','^[[12~'],
+ 'F3' : ['^[OR','^[[13~'],
+ 'F4' : ['^[OS','^[[14~'],
'F5' : ['^[[15~'],
'F6' : ['^[[17~'],
'F7' : ['^[[18~'],