catch cmd-q for quit

This commit is contained in:
cy384 2020-08-17 22:29:30 -04:00
parent 30a64faf16
commit 0dd720d7e8
1 changed files with 4 additions and 0 deletions

View File

@ -260,6 +260,10 @@ void event_loop(void)
case keyDown:
case autoKey: // autokey means we're repeating a held down key event
c = event.message & charCodeMask;
if (c && (event.modifiers & cmdKey)) // apple key
{
if (c == 'q') exit_event_loop = 1;
}
if (c)
{
if ('\r' == c) c = '\n';