Jeff Epler 406e46f46b
Allow serial "break" to trigger KeyboardInterrupt
When the USB serial buffer is full, the Ctrl-C code to send
KeyboardInterrupt can't be sent, which creates a problem if you've
pasted code or otherwise filled the buffer and need to recover.
A similar problem affects advanced UIs that interact with CircuitPython
and may send characters when they're unexpected, such as mu when it
tries to move the cursor based on the user clicking on the screen.

The main way forward seems to be to use some kind of message that can
still reach CircuitPython when its internal serial recieve buffer is full.
RS232 defines a "break" signal, in which the transmitting device holds its
data line in the "space" state for many entire character times. This still
exists in the world of USB serial.

This does work, sort of, except that your host computer software will need
to properly handle blocking serial writes; tio can send a break with
the **ctrl-c b** sequence, but this only works if it hasn't yet written
too much data, so it doesn't actually help in most situations :-/
2022-11-18 14:35:06 -06:00
..
2021-03-15 19:27:36 +05:30
2021-11-22 14:54:44 -08:00
2021-04-25 19:57:21 +09:00
2022-08-30 15:23:44 -04:00
2022-03-09 11:07:55 -05:00
2021-06-14 20:54:43 -04:00
2021-06-14 20:54:43 -04:00
2022-03-16 12:36:52 -04:00
2022-06-27 13:39:08 -07:00
2022-10-11 23:02:14 -04:00
2022-05-25 11:18:08 +02:00
2022-03-11 14:03:04 -05:00
2021-07-22 12:57:10 -04:00
2021-07-22 12:57:10 -04:00