]> git.sesse.net Git - vlc/commitdiff
XCB/window: Unicode non-Latin-1 keys (untested)
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 3 Jan 2010 10:08:46 +0000 (12:08 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 3 Jan 2010 10:08:46 +0000 (12:08 +0200)
This is incomplete. X11 defined a whole set of non-Latin-1 key symbols
before ISO 10646. Only the key symbols defined later match Unicode (with
the 0x1000000 offset).

modules/video_output/xcb/keys.c

index 43bfa72ea7a9449864456f0aca50260b7d104a60..a1369106528a7afad18dea1dde4be378646f3b1a 100644 (file)
@@ -178,6 +178,9 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym)
     /* X11 Latin-1 range */
     if (sym <= 0xff)
         return sym;
+    /* X11 Unicode range */
+    if (sym >= 0x1000100 && sym <= 0x110ffff)
+        return sym - 0x1000000;
 
     /* Special keys */
     res = bsearch (&sym, tab, sizeof (tab) / sizeof (tab[0]), sizeof (tab[0]),