added exit by escape key -xyious
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user