From 42e6dc1e7cace92918e29eeb1dd10baaaa235847 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 16 May 2021 19:20:13 -0700 Subject: [PATCH] Added key name for -1 --- btui.h | 1 + 1 file changed, 1 insertion(+) diff --git a/btui.h b/btui.h index 926e4b6..764329f 100644 --- a/btui.h +++ b/btui.h @@ -660,6 +660,7 @@ int btui_getkey(btui_t *bt, int timeout, int *mouse_x, int *mouse_y) */ char *btui_keyname(int key, char *buf) { + if (key == -1) return buf + sprintf(buf, ""); if (key & MOD_META) buf = stpcpy(buf, "Super-"); if (key & MOD_CTRL) buf = stpcpy(buf, "Ctrl-"); if (key & MOD_ALT) buf = stpcpy(buf, "Alt-");