[PATCH 00/15] Hardware keyboard input for input methods

Jan Arne Petersen jpetersen at openismus.com
Sun Nov 4 18:26:38 PST 2012


From: Jan Arne Petersen <jpetersen at openismus.com>

Hardware keyboard input allows input methods to grab the keyboard
and process hardware key events to generate text events (with
pre-edit) over the same text_model interface we use for the virtual
keyboard. This allows input methods which compose multiple key
events for inputting text like it is done for CJK languages.

There is a weston-simple-im which uses the hardware keyboard input
to support classic X compose key like combinations:
http://en.wikipedia.org/wiki/Compose_key#Common_compose_combinations

It makes allot of sense to reuse the wl_keyboard interface in the
input_method_context grab_keyboard request. But I am not so sure about
the wl_keyboard interface used in the get_keyboard request in
text_model. Maybe it would be better to merge the key event from 
wl_keyboard into text_models keysym event and just add also keymap
and modifiers event to text_model.

Jan Arne Petersen (15):
  editor: Fix handling of UTF-8 text
  editor: Initalize editor struct with 0
  editor: Remove preedit text on startup
  keyboard: commit preedit before sending key events
  keyboard: Rename keyboard to weston-keyboard
  text: Start input method from configuration
  text: Rename and extend text_model key event
  text: Add support for grabbing the keyboard
  text: Add get_keyboard to text_model
  text: Add seat argument to text_model enter event
  text: Add support for forwarding key events
  window: Add utils for xkb keyboard input
  window: Allow to get xkb context from display
  editor: Add support for hardware key events
  text: Add simple compose input method

 clients/.gitignore         |   3 +-
 clients/Makefile.am        |  20 ++-
 clients/editor.c           | 236 ++++++++++++++++++++++++++++---
 clients/keyboard-utils.c   | 173 +++++++++++++++++++++++
 clients/keyboard-utils.h   |  67 +++++++++
 clients/keyboard.c         |  72 +++++++---
 clients/weston-simple-im.c | 338 +++++++++++++++++++++++++++++++++++++++++++++
 clients/window.c           |   6 +
 clients/window.h           |   3 +
 protocol/input-method.xml  |  32 +++++
 protocol/text.xml          |  23 ++-
 src/compositor.c           |   2 +-
 src/compositor.h           |   4 +-
 src/text-backend.c         | 267 +++++++++++++++++++++++++++++++++--
 weston.ini                 |   3 +
 15 files changed, 1188 insertions(+), 61 deletions(-)
 create mode 100644 clients/keyboard-utils.c
 create mode 100644 clients/keyboard-utils.h
 create mode 100644 clients/weston-simple-im.c

-- 
1.7.11.7



More information about the wayland-devel mailing list