Add an input device function to convert keycodes to evdev codes

This adds a virtual function to ClutterInputDevice to translate a
keycode from the hardware_keycode member of ClutterKeyEvent to an
evdev keycode. The function can fail so that input backends that don't
have a sensible way to translate to evdev keycodes can return FALSE.
There are implementations for evdev, wayland and X. The X
implementation assumes that the X server is using an evdev driver in
which case the hardware keycodes are the evdev codes plus 8.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Neil Roberts
2012-01-17 15:40:08 +00:00
parent a3bbcff946
commit 13e3f9e5f1
8 changed files with 93 additions and 0 deletions

View File

@@ -1184,6 +1184,7 @@ clutter_input_device_set_enabled
clutter_input_device_get_enabled
clutter_input_device_get_associated_device
clutter_input_device_get_slave_devices
clutter_input_device_keycode_to_evdev
<SUBSECTION>
clutter_input_device_get_n_keys