Commit graph

9 commits

Author SHA1 Message Date
Simon Ser
ba32e4df21 ime: add support for actions 2021-10-08 22:55:01 -07:00
Simon Ser
a3ec65ef06 Switch to vendored protocol
We'll implement some more features on top of input-method, so let's
incubate our own protocol for now. We'll give feedback upstream
once we've experimented a bit with this approach.

The protocol is minimal: it just includes the features needed for
gamescope. It's always easier to add new requests/events than to
change existing ones.
2021-10-08 22:55:01 -07:00
Simon Ser
ad26899b20 ime: reset keymap after sending emulated key events
This fixes SteamOS' virtual keyboard.
2021-10-08 22:55:01 -07:00
Simon Ser
6d2b53197e ime: introduce keycode allow-list
Some clients (Chromium…) assume keycodes are always coming from
evdev, and interpret e.g. KEY_ESC directly without using the keymap.
2021-10-08 22:55:01 -07:00
Simon Ser
2ba6eefad8 ime: check for xkb_keysym_get_name errors 2021-10-08 22:55:01 -07:00
Simon Ser
6f26dae77e ime: send void keysym before key sequence
This works around Chromium issues.
2021-10-08 22:55:01 -07:00
Simon Ser
880c87f4c5 ime: disable key repeat
Just in case.
2021-10-08 22:55:01 -07:00
Simon Ser
97623694dc ime: remove unicode keysym name workaround
It seems like xkb_keysym_get_name behaves as expected now.
2021-10-08 22:55:01 -07:00
Simon Ser
49da53db55 Implement a subset of input-method-unstable-v2
This allows a Wayland client to send arbitrary UTF-8 text to the
currently focused X11 client. Useful for virtual keyboards.

We generate a keymap on-the-fly suitable for the text to type.
2021-10-08 22:55:01 -07:00