Skip to content

Commit 7d60cbf

Browse files
authored
Merge pull request magmax#65 from jhonatan-lopes/master
Fixed backspace and arrow support on Windows
2 parents 549c17a + 9b74c49 commit 7d60cbf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

readchar/key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
LF = "\x0d"
33
CR = "\x0a"
44
ENTER = "\x0d"
5-
BACKSPACE = "\x7f"
5+
BACKSPACE = "\x08"
66
SUPR = ""
77
SPACE = "\x20"
88
ESC = "\x1b"

readchar/readchar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
20960: key.PAGE_DOWN,
5454
18400: key.HOME,
5555
20448: key.END,
56-
18656: key.UP,
57-
20704: key.DOWN,
58-
19424: key.LEFT,
59-
19936: key.RIGHT,
56+
18432: key.UP, # 72 * 256
57+
20480: key.DOWN, # 80 * 256
58+
19200: key.LEFT, # 75 * 256
59+
19712: key.RIGHT, # 77 * 256
6060
}
6161

6262
def readkey(getchar_fn=None):

0 commit comments

Comments
 (0)