Expand description

text input

The zwp_text_input_v2 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the text input focus for a seat.

Requests are used to enable/disable the text-input object and set state information like surrounding and selected text or the content type. The information about the entered text is sent to the text-input object via the pre-edit and commit events. Using this interface removes the need for applications to directly process hardware key events and compose text out of them.

Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices have to always point to the first byte of an UTF-8 encoded code point. Lengths are not allowed to contain just a part of an UTF-8 encoded code point.

State is sent by the state requests (set_surrounding_text, set_content_type, set_cursor_rectangle and set_preferred_language) and an update_state request. After an enter or an input_method_change event all state information is invalidated and needs to be resent from the client. A reset or entering a new widget on client side also invalidates all current state information.

Structs§

Enums§

Constants§