does XkbSetMap affect XTestFakeKeyEvent?

Daiki Ueno ueno at
Wed Oct 24 19:52:58 PDT 2012

Daiki Ueno <ueno at> writes:

> (1) assign a keysym to some unused keycode (like keycode 246, which
>     XF86WLAN is assigned here) with XkbSetMap
> (2) send key press event using XTestFakeKeyEvent to get the keysym typed
> Is this supposed to work?  After (1), I could type the new keysym with
> physical keyboard, but couldn't with XTestFakeKeyEvent.  If I change the
> mapping with XChangeKeyboardMapping instead of XkbSetMap, it seems to
> work with both physical and virtual keyboard.

Sorry for the noise.
It was solved by setting xkb->device_spec when calling XkbSetMap.

Daiki Ueno

More information about the xorg mailing list