Added key name for -1

This commit is contained in:
Bruce Hill 2021-05-16 19:20:13 -07:00
parent 60e643e02a
commit 42e6dc1e7c

1
btui.h
View File

@ -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, "<none>");
if (key & MOD_META) buf = stpcpy(buf, "Super-");
if (key & MOD_CTRL) buf = stpcpy(buf, "Ctrl-");
if (key & MOD_ALT) buf = stpcpy(buf, "Alt-");