[vlc-commits] XCB/window: map Super and AltGr keys to Meta and Alt modifiers resp.

Rémi Denis-Courmont git at videolan.org
Wed Nov 6 21:40:20 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov  6 22:28:51 2013 +0200| [d373cb8d9f1f516daa0e9ebeb3b7b03408f8fce1] | committer: Rémi Denis-Courmont

XCB/window: map Super and AltGr keys to Meta and Alt modifiers resp.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d373cb8d9f1f516daa0e9ebeb3b7b03408f8fce1
---

 modules/video_output/xcb/keys.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/xcb/keys.c b/modules/video_output/xcb/keys.c
index baac6ca..debf1b7 100644
--- a/modules/video_output/xcb/keys.c
+++ b/modules/video_output/xcb/keys.c
@@ -153,14 +153,20 @@ int XCB_keyHandler_Process (key_handler_t *ctx, xcb_generic_event_t *ev)
                      vk, sym);
             if (vk == KEY_UNSET)
                 break;
-            if (e->state & XCB_MOD_MASK_SHIFT)
+            if (e->state & XCB_MOD_MASK_SHIFT) /* Shift */
                 vk |= KEY_MODIFIER_SHIFT;
-            if (e->state & XCB_MOD_MASK_CONTROL)
+            /* XCB_MOD_MASK_LOCK */ /* Caps Lock */
+            if (e->state & XCB_MOD_MASK_CONTROL) /* Control */
                 vk |= KEY_MODIFIER_CTRL;
-            if (e->state & XCB_MOD_MASK_1)
+            if (e->state & XCB_MOD_MASK_1) /* Alternate */
                 vk |= KEY_MODIFIER_ALT;
-            if (e->state & XCB_MOD_MASK_4)
+            /* XCB_MOD_MASK_2 */ /* Numeric Pad Lock */
+            if (e->state & XCB_MOD_MASK_3) /* Super */
                 vk |= KEY_MODIFIER_META;
+            if (e->state & XCB_MOD_MASK_4) /* Meta */
+                vk |= KEY_MODIFIER_META;
+            if (e->state & XCB_MOD_MASK_5) /* Alternate Graphic */
+                vk |= KEY_MODIFIER_ALT;
             var_SetInteger (ctx->obj->p_libvlc, "key-pressed", vk);
             break;
         }



More information about the vlc-commits mailing list