File tree Expand file tree Collapse file tree 4 files changed +53
-71
lines changed Expand file tree Collapse file tree 4 files changed +53
-71
lines changed Original file line number Diff line number Diff line change 1+ # common
2+ LF = "\x0a "
3+ CR = "\x0d "
4+ SPACE = "\x20 "
5+ ESC = "\x1b "
6+ TAB = "\x09 "
7+
8+ # CTRL
9+ CTRL_A = "\x01 "
10+ CTRL_B = "\x02 "
11+ CTRL_C = "\x03 "
12+ CTRL_D = "\x04 "
13+ CTRL_E = "\x05 "
14+ CTRL_F = "\x06 "
15+ CTRL_G = "\x07 "
16+ CTRL_H = "\x08 "
17+ CTRL_I = TAB
18+ CTRL_J = LF
19+ CTRL_K = "\x0b "
20+ CTRL_L = "\x0c "
21+ CTRL_M = CR
22+ CTRL_N = "\x0e "
23+ CTRL_O = "\x0f "
24+ CTRL_P = "\x10 "
25+ CTRL_Q = "\x11 "
26+ CTRL_R = "\x12 "
27+ CTRL_S = "\x13 "
28+ CTRL_T = "\x14 "
29+ CTRL_U = "\x15 "
30+ CTRL_V = "\x16 "
31+ CTRL_W = "\x17 "
32+ CTRL_X = "\x18 "
33+ CTRL_Y = "\x19 "
34+ CTRL_Z = "\x1a "
Original file line number Diff line number Diff line change 1+ from ._base_key import *
2+
3+
14# common
2- LF = "\x0a "
3- CR = "\x0d "
4- ENTER = LF
55BACKSPACE = "\x7f "
6- SPACE = "\x20 "
7- ESC = "\x1b "
8- TAB = "\x09 "
9-
10- # CTRL
11- CTRL_A = "\x01 "
12- CTRL_B = "\x02 "
13- CTRL_C = "\x03 "
14- CTRL_D = "\x04 "
15- CTRL_E = "\x05 "
16- CTRL_F = "\x06 "
17- CTRL_G = "\x07 "
18- CTRL_H = "\x08 "
19- CTRL_I = TAB
20- CTRL_J = LF
21- CTRL_K = "\x0b "
22- CTRL_L = "\x0c "
23- CTRL_M = CR
24- CTRL_N = "\x0e "
25- CTRL_O = "\x0f "
26- CTRL_P = "\x10 "
27- CTRL_Q = "\x11 "
28- CTRL_R = "\x12 "
29- CTRL_S = "\x13 "
30- CTRL_T = "\x14 "
31- CTRL_U = "\x15 "
32- CTRL_V = "\x16 "
33- CTRL_W = "\x17 "
34- CTRL_X = "\x18 "
35- CTRL_Y = "\x19 "
36- CTRL_Z = "\x1a "
376
387# cursors
398UP = "\x1b \x5b \x41 "
4413# navigation keys
4514INSERT = "\x1b \x5b \x32 \x7e "
4615SUPR = "\x1b \x5b \x33 \x7e "
47- DELETE = SUPR
4816HOME = "\x1b \x5b \x48 "
4917END = "\x1b \x5b \x46 "
5018PAGE_UP = "\x1b \x5b \x35 \x7e "
7543
7644# CTRL+ALT+_
7745CTRL_ALT_A = "\x1b \x01 "
46+
47+
48+ # aliases
49+ ENTER = LF
50+ DELETE = SUPR
Original file line number Diff line number Diff line change 1- # common
2- LF = "\x0a "
3- CR = "\x0d "
4- ENTER = CR
5- BACKSPACE = "\x08 "
6- SPACE = "\x20 "
7- ESC = "\x1b "
8- TAB = "\x09 "
1+ from ._base_key import *
92
10- # CTRL
11- CTRL_A = "\x01 "
12- CTRL_B = "\x02 "
13- CTRL_C = "\x03 "
14- CTRL_D = "\x04 "
15- CTRL_E = "\x05 "
16- CTRL_F = "\x06 "
17- CTRL_G = "\x07 "
18- CTRL_H = BACKSPACE
19- CTRL_I = TAB
20- CTRL_J = LF
21- CTRL_K = "\x0b "
22- CTRL_L = "\x0c "
23- CTRL_M = CR
24- CTRL_N = "\x0e "
25- CTRL_O = "\x0f "
26- CTRL_P = "\x10 "
27- CTRL_Q = "\x11 "
28- CTRL_R = "\x12 "
29- CTRL_S = "\x13 "
30- CTRL_T = "\x14 "
31- CTRL_U = "\x15 "
32- CTRL_V = "\x16 "
33- CTRL_W = "\x17 "
34- CTRL_X = "\x18 "
35- CTRL_Y = "\x19 "
36- CTRL_Z = "\x1a "
373
384# Windows uses scan codes for extended characters. This dictionary
395# translates the second half of the scan codes of special Keys
4410# or
4511# https://www.freepascal.org/docs-html/rtl/keyboard/kbdscancode.html
4612
13+ # common
14+ BACKSPACE = "\x08 "
15+
4716# cursors
4817UP = "\x00 \x48 "
4918DOWN = "\x00 \x50 "
5322# navigation keys
5423INSERT = "\x00 \x52 "
5524SUPR = "\x00 \x53 "
56- DELETE = SUPR
5725HOME = "\x00 \x47 "
5826END = "\x00 \x4f "
5927PAGE_UP = "\x00 \x49 "
8250# CTRL_ALT_[A-Z],
8351# CTRL_ALT_SUPR,
8452# CTRL-F1
53+
54+
55+ # aliases
56+ ENTER = CR
57+ DELETE = SUPR
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ exclude =
6767show-source = true
6868statistics = true
6969count = true
70+ per-file-ignores =
71+ readchar/*_key.py:F403,F405
7072
7173[tool.coverage.run]
7274omit = tests/*
You can’t perform that action at this time.
0 commit comments