diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2012-11-18 19:06:43 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-11-27 13:02:26 -0500 |
commit | d9be93b96453e73aa53278a319d9e771ec4c06ab (patch) | |
tree | 970d7f41b6232459ced9e1368251e0ee110b618d /protocol | |
parent | 674fd1d62531093ab13bd67d86517d1aad18733d (diff) |
text: Rename and extend text_model key event
Rename the key event in text_model to keysym and add serial, time and
modifiers arguments. Add a modifiers_map event to transfer an array of
0-terminated modifier names, so that a mapping of modifiers to the
modifier bit mask is possible.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/input-method.xml | 17 | ||||
-rw-r--r-- | protocol/text.xml | 22 |
2 files changed, 32 insertions, 7 deletions
diff --git a/protocol/input-method.xml b/protocol/input-method.xml index 09ab10ce..69b1277a 100644 --- a/protocol/input-method.xml +++ b/protocol/input-method.xml @@ -53,9 +53,22 @@ <arg name="index" type="int"/> <arg name="length" type="uint"/> </request> - <request name="key"> - <arg name="key" type="uint"/> + <request name="modifiers_map"> + <arg name="map" type="array"/> + </request> + <request name="keysym"> + <description summary="keysym"> + Notify when a key event was sent. Key events should not be used + for normal text input operations, which should be done with + commit_string, delete_surrounfing_text, etc. The key event follows + the wl_keyboard key event convention. State is a XKB keysym, state a + wl_keyboard key_state. + </description> + <arg name="serial" type="uint"/> + <arg name="time" type="uint"/> + <arg name="sym" type="uint"/> <arg name="state" type="uint"/> + <arg name="modifiers" type="uint"/> </request> <event name="surrounding_text"> <description summary="surrounding text event"> diff --git a/protocol/text.xml b/protocol/text.xml index 1b3a4b56..4701f7d0 100644 --- a/protocol/text.xml +++ b/protocol/text.xml @@ -113,16 +113,28 @@ <arg name="length" type="uint"/> </event> <event name="preedit_styling"/> - <event name="key"> - <description summary="key"> + <event name="modifiers_map"> + <description summary="modifiers map"> + Transfer an array of 0-terminated modifiers names. The position in + the array is the index of the modifier as used in the modifiers + bitmask in the keysym event. + </description> + <arg name="map" type="array"/> + </event> + <event name="keysym"> + <description summary="keysym"> Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounfing_text, etc. The key event follows - the wl_keyboard key event convention. Key is a XKB keycode, state a - wl_keyboard key_state. + the wl_keyboard key event convention. State is a XKB keysym, state a + wl_keyboard key_state. Modifiers are a mask for effective modifiers + (where the modfier indices are set by the modifiers_map event) </description> - <arg name="key" type="uint"/> + <arg name="serial" type="uint"/> + <arg name="time" type="uint"/> + <arg name="sym" type="uint"/> <arg name="state" type="uint"/> + <arg name="modifiers" type="uint"/> </event> <event name="selection_replacement"/> <event name="direction"/> |