GHOST/X11: Map unknown de,fr keys to accentgrave
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2018 12:53:03 +0000 (14:53 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2018 12:53:03 +0000 (14:53 +0200)
This still uses the correct string when typing text,
it just allows the key to be used in keymaps.

We should eventually add scan-code support.

intern/ghost/intern/GHOST_SystemX11.cpp

index 62befc2..cecfeee 100644 (file)
@@ -1743,6 +1743,9 @@ convertXKey(KeySym key)
                        GXMAP(type, XF86XK_AudioForward, GHOST_kKeyMediaLast);
 #endif
 #endif
+                       /* Non US keyboard layouts: avoid 'UnknownKey' - TODO(campbell): lookup scan-codes. */
+                       GXMAP(type, XK_dead_circumflex, GHOST_kKeyAccentGrave);         /* 'de' */
+                       GXMAP(type, XK_twosuperior, GHOST_kKeyAccentGrave);             /* 'fr' */
                        default:
                                type = GHOST_kKeyUnknown;
                                break;