ctrl arrow keys on linux
# found in the LICENSE file.
import curses
+import sys
CTRL_AT = 0x00
@@ -39,6 +40,14 @@ CTRL_CLOSE_BRACKET = 0x1d # ^]
CTRL_CARROT = 0x1e # ^^
CTRL_UNDERBAR = 0x1f # ^_
+KEY_ALT_A = 165
+KEY_ALT_B = 171
+KEY_ALT_C = 167
+KEY_ALT_S = 159
+KEY_ALT_LEFT = 68
+KEY_ALT_RIGHT = 67
+
+if sys.platform == 'darwin':
KEY_CTRL_DOWN = 521
KEY_CTRL_SHIFT_DOWN = 522
KEY_CTRL_LEFT = 541
@@ -47,11 +56,15 @@ KEY_CTRL_RIGHT = 556
KEY_CTRL_SHIFT_RIGHT = 557
KEY_CTRL_UP = 562
KEY_CTRL_SHIFT_UP = 563
-
-KEY_ALT_A = 165
-KEY_ALT_B = 171
-KEY_ALT_C = 167
-KEY_ALT_S = 159
+else:
+ KEY_CTRL_DOWN = 524
+ KEY_CTRL_SHIFT_DOWN = 525
+ KEY_CTRL_LEFT = 544
+ KEY_CTRL_SHIFT_LEFT = 545
+ KEY_CTRL_RIGHT = 559
+ KEY_CTRL_SHIFT_RIGHT = 560
+ KEY_CTRL_UP = 565
+ KEY_CTRL_SHIFT_UP = 566
KEY_SHIFT_DOWN = 336
KEY_SHIFT_F1 = 277
