]> git.sesse.net Git - vlc/blobdiff - modules/video_output/xcb/keys.c
XCB/window: Unicode non-Latin-1 keys (untested)
[vlc] / modules / video_output / xcb / keys.c
index fa50e80cef7b8159e12596c466145999c9a8e11c..a1369106528a7afad18dea1dde4be378646f3b1a 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <stdlib.h>
 #include <inttypes.h>
-#include <ctype.h>
 #include <assert.h>
 
 #include <xcb/xcb.h>
@@ -176,9 +175,12 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym)
         { XF86XK_Reload,           KEY_BROWSER_REFRESH, },
     };
 
-    /* X11 and VLC both use the ASCII code for printable ASCII characters. */
-    if (isascii(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]),