Skip to main content

Module vkclient

Module vkclient 

Source
Expand description

Virtual-keyboard client for typing into a nested app compositor’s socket. zwp_virtual_keyboard_v1 client for typing Unicode text into a nested compositor’s socket.

pixelflux is normally the compositor, but in a nested deployment (a labwc/kwin session running as a client of pixelflux) the apps live on that inner compositor’s socket, and keys injected into pixelflux’s own seat resolve against pixelflux’s keymap — an overlay the inner compositor never sees. So text is typed here as a client of whichever compositor the apps live under — by Computer-Use actions and by selkies over the type_text_wayland ABI — reusing the seat’s [KeymapPolicy] over a US base: base-reachable characters press their ordinary keycodes, everything else is overlay-bound. The client is PERSISTENT per socket: the connection, virtual-keyboard device and its uploaded keymap live across calls, so a flush re-uploads (and settles) only when the accumulated keymap actually changed, and key events ride the protocol’s ordering in one batch with a single closing round-trip. Any failure drops the cached connection and one reconnect is attempted before the error propagates, so a restarted app compositor heals on the next call. Blocking, off the compositor thread, with every round-trip deadline-bounded so a wedged compositor cannot hang the caller forever.

Functions§

type_keysyms_to
Like type_text_to, but taps the given keysyms verbatim: the caller owns which keysym spells which character; this owns delivery (base-reachable keysyms press their ordinary keycodes, the rest overlay-bind).
type_text_to
Type text in order through the persistent client for socket_path. Codepoints with no keysym are skipped. Blocking; call off the compositor’s calloop thread.