]> git.sesse.net Git - vlc/blobdiff - modules/video_output/xcb/keys.c
Fix an incorect cast warning
[vlc] / modules / video_output / xcb / keys.c
index 21491fee0b5a4d56b08c0194d659cb609a7b8a9d..e57fd244e1f67a8ff5f2bddd4356b03e89dc836c 100644 (file)
@@ -162,8 +162,6 @@ static int ConvertKeySym (xcb_keysym_t sym)
         return KEY_SPACE;
     if (isascii(sym))
         return sym;
-    if (sym > XK_Delete)
-        return KEY_UNSET;
 
     /* Special keys */
     res = bsearch (&sym, tab, sizeof (tab) / sizeof (tab[0]), sizeof (tab[0]),
@@ -211,7 +209,14 @@ int ProcessKeyEvent (key_handler_t *ctx, xcb_generic_event_t *ev)
         case XCB_KEY_RELEASE:
             break;
 
-        /*TODO: key mappings update*/
+        case XCB_MAPPING_NOTIFY:
+        {
+            xcb_mapping_notify_event_t *e = (xcb_mapping_notify_event_t *)ev;
+            msg_Dbg (ctx->obj, "refreshing keyboard mapping");
+            xcb_refresh_keyboard_mapping (ctx->syms, e);
+            break;
+        }
+
         default:
             return -1;
     }