added exit by escape key -xyious

This commit is contained in:
Annika committed 2026-07-06 12:40:35 -07:00
1 parent 95e9e92b40
commit 64dbdb670c
2 files changed
+3

No files matched your search

BIN
View File
Binary file not shown.
+3
View File
@@ -15,6 +15,9 @@
// this should be handled elsewhere, eventually, maybe, probably // this should be handled elsewhere, eventually, maybe, probably
static void on_key(void *user, uint32_t keycode, uint32_t state) { static void on_key(void *user, uint32_t keycode, uint32_t state) {
if (keycode == 1) {
exit(1);
}
(void)user; (void)user;
const char *label = state ? "down" : "up "; const char *label = state ? "down" : "up ";
printf("key %s: %u\n", label, keycode); printf("key %s: %u\n", label, keycode);