Skip to content

Commit efa240e

Browse files
author
none
committed
console: fix ^C^C^C-to-exit
1 parent 2b1e375 commit efa240e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

TODO

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Things to investigate / fix:
2-
✔ exceptions in callbacks should be suitably fatal, not ignored @high @done (22-06-21 21:45)
32
☐ symbolication for e.g. address zero is printing vector names
43
☐ MAP operations should not symbolicate
54

@@ -8,9 +7,8 @@ Features:
87
Musashi:
98
☐ recursive bus errors should just be double bus faults @high
109
Console:
11-
✔ Characters not making it to apps: ^S, ^Q, ^Z (suspends console), ^Y (suspends console) @done (22-06-21 19:43)
1210
☐ Characters not making it to apps: ESC, cursor keys (timing?)
13-
☐ Consider using Textual to build a better console? (plus other stuff)
11+
☐ Consider using Textual to build a better console? (plus other stuff) @low
1412
Tracing:
1513
Needs a complete rethink
1614
☐ trace message via NatFeat
@@ -51,7 +49,6 @@ P90MB:
5149
☐ RC2014 boards
5250
☐ UART: seem to be losing transmit-complete interrupts
5351
hard to reproduce
54-
✔ UART: reduce character delay for snappier user experience @done (22-06-21 19:44)
5552

5653
Rosco M68k v2:
5754

@@ -74,6 +71,10 @@ Documentation:
7471
☐ update README.md
7572

7673
Archive:
74+
✔ ^C^C^C not exiting console @high @done (22-06-22 18:49) @project(Console)
75+
✔ exceptions in callbacks should be suitably fatal, not ignored @high @done (22-06-21 21:45) @project(Things to investigate / fix)
76+
✔ UART: reduce character delay for snappier user experience @done (22-06-21 19:44) @project(P90MB)
77+
✔ Characters not making it to apps: ^S, ^Q, ^Z (suspends console), ^Y (suspends console) @done (22-06-21 19:43) @project(Console)
7778
✘ I2C realtime clock device @cancelled (22-06-19 12:27) @project(Tiny68k)
7879
clock on the board is busted, not worth it
7980
✔ fix console in/output paths to be bytes all the way through @done (22-06-19 12:25) @project(Things to investigate / fix)

consoleserver.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def __init__(self):
4848
self._want_exit = False
4949

5050
def run(self):
51-
signal.signal(signal.SIGINT, self._keyboard_interrupt)
5251
curses.wrapper(self._run)
5352

5453
def _run(self, win):
@@ -141,13 +140,15 @@ def _update(self):
141140

142141
input = self._win.getch()
143142
if input != -1:
143+
if input == 3:
144+
self._ctrl_c()
144145
if input in ConsoleServer.input_keymap:
145146
for c in ConsoleServer.input_keymap[input]:
146147
self._handle_input(ord(c))
147148
else:
148149
self._handle_input(input)
149150

150-
def _keyboard_interrupt(self, signal=None, frame=None):
151+
def _ctrl_c(self):
151152
now = time.time()
152153
interval = now - self._first_interrupt_time
153154

0 commit comments

Comments
 (0)