summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 5ffe47f..2e3d2c3 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -80,7 +80,16 @@ screen_main(struct screen *screen, struct speech *speech)
break;
case 'q':
return true;
+ case 0x1B: /* ASCII ESC */
+ if (wgetch(screen->win) == ERR) { /* Esc key */
+ return true;
+ }
+ /* Probably a CSI sequence */
+ while (wgetch(screen->win) != ERR);
+ play = true;
+ break;
default:
+ /* Just to be safe: */
while (wgetch(screen->win) != ERR);
play = true;
}