Nicer debug print for key debugging

This commit is contained in:
Kovid Goyal 2018-07-12 09:39:05 +05:30
parent 6e9aecdff3
commit 1a1aa2d6aa
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

2
glfw/xkb_glfw.c vendored
View File

@ -442,7 +442,7 @@ glfw_xkb_handle_key_event(_GLFWwindow *window, _GLFWXKBData *xkb, xkb_keycode_t
#else #else
key_event.ibus_keycode -= 8; key_event.ibus_keycode -= 8;
#endif #endif
debug("scancode: 0x%x release: %d ", scancode, action == GLFW_RELEASE); debug("%s scancode: 0x%x ", action == GLFW_RELEASE ? "Release" : "Press", scancode);
XKBStateGroup *sg = &xkb->states; XKBStateGroup *sg = &xkb->states;
int num_syms = xkb_state_key_get_syms(sg->state, code_for_sym, &syms); int num_syms = xkb_state_key_get_syms(sg->state, code_for_sym, &syms);
int num_clean_syms = xkb_state_key_get_syms(sg->clean_state, code_for_sym, &clean_syms); int num_clean_syms = xkb_state_key_get_syms(sg->clean_state, code_for_sym, &clean_syms);