clients: Add XKB compose key support

Graphics / Wayland / Weston - Bryce Harrington [osg.samsung.com] - 11 October 2016 12:42 UTC

This adds single-symbol compose support using libxkbcommon's compose functionality. E.g., assuming you have the right alt key defined as your compose key, typing +i+' will produce í, and +y+= will produce ¥. This makes compose key work for weston-editor, weston-terminal, weston-eventdemo, and any other clients that use Weston's window.* routines for accepting and managing keyboard input.

Compose sequences are loaded from the system's standard tables. As well, libxkbcommon will transparently load custom sequences from the user's ~/.XCompose file.

Note that due to limitations in toytoolkit's key handler interface, only compose sequences resulting in single symbols are supported. While libxkbcommon supports multi-symbol compose strings, support for passing text buffers to Weston clients is left as future work.

This largely obviates the need for the weston-simple-im input method client, which had provided a very limited compose functionality that was only available in clients implementing the zwp_input_method protocol, and with no mechanism to load system or user-specified compose keys.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=53648

894b3ec clients: Add XKB compose key support
clients/window.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)

Upstream: cgit.freedesktop.org


  • Share