Commit d373cb8d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

parent 2f3e3eb8
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment