We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
readkey()
1 parent b8f9748 commit b37e315Copy full SHA for b37e315
readchar/_posix_read.py
@@ -26,6 +26,9 @@ def readkey() -> str:
26
27
c1 = readchar()
28
29
+ if c1 == "\x03":
30
+ raise KeyboardInterrupt
31
+
32
if c1 != "\x1B":
33
return c1
34
readchar/_win_read.py
@@ -15,6 +15,9 @@ def readkey() -> str:
15
16
ch = readchar()
17
18
+ if ch == "\x03":
19
20
21
# if it is a normal character:
22
if ch not in "\x00\xe0":
23
return ch
0 commit comments