From 5e619dd788b0b1e1a1cbe4da524b8362614f6f59 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon <44397098+microbit-matt-hillsdon@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:56:39 +0100 Subject: [PATCH] Fix interrupting input() (#103) Handle pending KeyboardInterrupt. Closes #100 --- src/mphalport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mphalport.c b/src/mphalport.c index 266a8e5c..1d2771f2 100644 --- a/src/mphalport.c +++ b/src/mphalport.c @@ -25,6 +25,7 @@ int mp_hal_stdin_rx_chr(void) { if (c != -1) { return c; } + mp_handle_pending(true); microbit_hal_idle(); } }