tools/interactive-x11: use keysym to look for Esc

Don't assume that keycode 9 means Escape. Instead, use the keymap
to check for Esc.

Logic copied from the Wayland version.

Signed-off-by: Simon Ser <contact@emersion.fr>
master
Simon Ser 2021-07-12 11:05:50 +02:00 committed by Ran Benita
parent eb59a1c55b
commit 5419e57736
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ process_event(xcb_generic_event_t *gevent, struct keyboard *kbd)
XKB_CONSUMED_MODE_XKB); XKB_CONSUMED_MODE_XKB);
/* Exit on ESC. */ /* Exit on ESC. */
if (keycode == 9) if (xkb_state_key_get_one_sym(kbd->state, keycode) == XKB_KEY_Escape)
terminate = true; terminate = true;
break; break;
} }