GHOST/X11: Print the keycode w/ debug enabled
authorCampbell Barton <ideasman42@gmail.com>
Sat, 9 Jun 2018 10:53:39 +0000 (12:53 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 9 Jun 2018 10:53:39 +0000 (12:53 +0200)
intern/ghost/intern/GHOST_SystemX11.cpp

index b8069e81eab9471ad66cf4767ba26ced3ed2482b..ac77fb3e196f1f658f6df836dfb5f2c15de2c347 100644 (file)
@@ -1795,10 +1795,14 @@ ghost_key_from_keycode(const XkbDescPtr xkb_descr, const KeyCode keycode)
        if (keycode >= xkb_descr->min_key_code && keycode <= xkb_descr->max_key_code) {
                const char *id_str = xkb_descr->names->keys[keycode].name;
                const uint32_t id = MAKE_ID(id_str[0], id_str[1], id_str[2], id_str[3]);
-               // printf("scancode is: %.*s\n", XkbKeyNameLength, id_str);
                switch (id) {
                        case MAKE_ID('T', 'L', 'D', 'E'):
                                return GHOST_kKeyAccentGrave;
+#ifdef GHOST_DEBUG
+                       default:
+                               printf("%s unhandled keycode: %.*s\n", __func__, XkbKeyNameLength, id_str);
+                               break;
+#endif
                }
        }
        else {