1# common
2LF = "\x0d"
3CR = "\x0a"
4ENTER = "\x0d"
5BACKSPACE = "\x7f"
6SUPR = ""
7SPACE = "\x20"
8ESC = "\x1b"
9
10# CTRL
11CTRL_A = '\x01'
12CTRL_B = '\x02'
13CTRL_C = '\x03'
14CTRL_D = '\x04'
15CTRL_E = '\x05'
16CTRL_F = '\x06'
17CTRL_G = '\x07'
18CTRL_H = '\x08'
19CTRL_I = '\t'
20CTRL_J = '\n'
21CTRL_K = '\x0b'
22CTRL_L = '\x0c'
23CTRL_M = '\r'
24CTRL_N = '\x0e'
25CTRL_O = '\x0f'
26CTRL_P = '\x10'
27CTRL_Q = '\x11'
28CTRL_R = '\x12'
29CTRL_S = '\x13'
30CTRL_T = '\x14'
31CTRL_U = '\x15'
32CTRL_V = '\x16'
33CTRL_W = '\x17'
34CTRL_X = '\x18'
35CTRL_Y = '\x19'
36CTRL_Z = '\x1a'
37
38# ALT
39ALT_A = "\x1b\x61"
40
41# CTRL + ALT
42CTRL_ALT_A = "\x1b\x01"
43
44# cursors
45UP = "\x1b\x5b\x41"
46DOWN = "\x1b\x5b\x42"
47LEFT = "\x1b\x5b\x44"
48RIGHT = "\x1b\x5b\x43"
49
50CTRL_ALT_SUPR = "\x1b\x5b\x33\x5e"
51
52# other
53F1 = "\x1b\x4f\x50"
54F2 = "\x1b\x4f\x51"
55F3 = "\x1b\x4f\x52"
56F4 = "\x1b\x4f\x53"
57F5 = "\x1b\x4f\x31\x35\x7e"
58F6 = "\x1b\x4f\x31\x37\x7e"
59F7 = "\x1b\x4f\x31\x38\x7e"
60F8 = "\x1b\x4f\x31\x39\x7e"
61F9 = "\x1b\x4f\x32\x30\x7e"
62F10 = "\x1b\x4f\x32\x31\x7e"
63F11 = "\x1b\x4f\x32\x33\x7e"
64F12 = "\x1b\x4f\x32\x34\x7e"
65
66PAGE_UP = "\x1b\x5b\x35\x7e"
67PAGE_DOWN = "\x1b\x5b\x36\x7e"
68HOME = "\x1b\x5b\x48"
69END = "\x1b\x5b\x46"
70
71INSERT = "\x1b\x5b\x32\x7e"
72SUPR = "\x1b\x5b\x33\x7e"
73
74
75ESCAPE_SEQUENCES = (
76    ESC,
77    ESC + "\x5b",
78    ESC + "\x5b" + "\x31",
79    ESC + "\x5b" + "\x32",
80    ESC + "\x5b" + "\x33",
81    ESC + "\x5b" + "\x35",
82    ESC + "\x5b" + "\x36",
83    ESC + "\x5b" + "\x31" + "\x35",
84    ESC + "\x5b" + "\x31" + "\x36",
85    ESC + "\x5b" + "\x31" + "\x37",
86    ESC + "\x5b" + "\x31" + "\x38",
87    ESC + "\x5b" + "\x31" + "\x39",
88    ESC + "\x5b" + "\x32" + "\x30",
89    ESC + "\x5b" + "\x32" + "\x31",
90    ESC + "\x5b" + "\x32" + "\x32",
91    ESC + "\x5b" + "\x32" + "\x33",
92    ESC + "\x5b" + "\x32" + "\x34",
93    ESC + "\x4f",
94    ESC + ESC,
95    ESC + ESC + "\x5b",
96    ESC + ESC + "\x5b" + "\x32",
97    ESC + ESC + "\x5b" + "\x33",
98)
99