plato: add an esc -ctrl Z sequence to get out of it at any time
authorAlan Cox <alan@linux.intel.com>
Sat, 8 Sep 2018 21:00:18 +0000 (22:00 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 8 Sep 2018 21:00:18 +0000 (22:00 +0100)
Applications/plato/fuzix/keyboard.c

index 16d47e4..d339937 100644 (file)
@@ -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();