Skip to content

Implement input method keyboard grab

Affe Null requested to merge affe_null/phoc:im-keyboard-grab into main

Based on https://github.com/swaywm/sway/pull/4932

This is needed for input methods that use input from a hardware keyboard.

I am currently implementing an alphabetic input method for feature phones, which have small non-touch screens and number keys. The input method needs to intercept key events and either send some input events based on them (using the input-method protocol) or forward them back to the compositor (using the virtual-keyboard protocol).

Although it can only be used by input methods, it allows listening to all keyboard events (unlike phosh_private_keyboard_event), so it may also be useful for implementing complex keyboard shortcuts (combinations or sequences of multiple non-modifier keys), another feature which is needed on phones with small hardware keypads.

There are many other use cases, e.g. Chinese character input using a hardware QWERTY keyboard.

Merge request reports