From: Alan Cox Date: Sat, 8 Sep 2018 21:00:18 +0000 (+0100) Subject: plato: add an esc -ctrl Z sequence to get out of it at any time X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8010a5cdd69dc9ef11b65ffc720e925d53e3d9c4;p=FUZIX.git plato: add an esc -ctrl Z sequence to get out of it at any time --- diff --git a/Applications/plato/fuzix/keyboard.c b/Applications/plato/fuzix/keyboard.c index 16d47e47..d3399373 100644 --- a/Applications/plato/fuzix/keyboard.c +++ b/Applications/plato/fuzix/keyboard.c @@ -23,6 +23,7 @@ static uint8_t shift_lock = false; static uint8_t is_escape = false; extern uint8_t xoff_enabled; extern padBool TTY; +extern uint8_t io_eof; /** * keyboard_main - Handle the keyboard presses @@ -42,6 +43,10 @@ void keyboard_main(void) } return; } + if (is_escape == true && ch == 0x1A) { // ESC CTRL-Z + io_eof = 1; + return; + } if (is_escape == true && ch == 0x1B) // ESC { screen_beep();