xkbcommon: Converting keysym to keycode

Andri Yngvason andri at yngvason.is
Wed Dec 1 14:46:27 UTC 2021


Hi adlo

mið., 1. des. 2021 kl. 14:31 skrifaði adlo <adloconwy at gmail.com>:
>
> Hi
>
> Does xkbcommon have a function to convert a keysym to a keycode?

It does not, last time I checked, but
"xkb_keymap_key_get_mods_for_level" does help a lot.

Wayvnc does this sort of reverse key mapping. Maybe this helps? See:
https://github.com/any1/wayvnc/blob/master/src/keyboard.c

Regards,
Andri


More information about the wayland-devel mailing list