Add an input device function to convert keycodes to evdev codes
authorNeil Roberts <neil@linux.intel.com>
Tue, 17 Jan 2012 15:40:08 +0000 (15:40 +0000)
committerNeil Roberts <neil@linux.intel.com>
Thu, 1 Mar 2012 11:41:51 +0000 (11:41 +0000)
commit13e3f9e5f1f1f648280a154fe1900fce4a26500a
tree28ca8ba0607ea2b2abf1c7102909e54a26ab2345
parenta3bbcff946295f6e7232697fd167437baef6b785
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>
clutter/clutter-device-manager-private.h
clutter/clutter-input-device.c
clutter/clutter-input-device.h
clutter/evdev/clutter-input-device-evdev.c
clutter/wayland/clutter-input-device-wayland.c
clutter/x11/clutter-input-device-core-x11.c
clutter/x11/clutter-input-device-xi2.c
doc/reference/clutter/clutter-sections.txt