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:
@ -97,6 +97,10 @@ void clutter_input_device_ungrab (ClutterInputDev
|
||||
CLUTTER_AVAILABLE_IN_1_10
|
||||
ClutterActor * clutter_input_device_get_grabbed_actor (ClutterInputDevice *device);
|
||||
|
||||
gboolean clutter_input_device_keycode_to_evdev (ClutterInputDevice *device,
|
||||
guint hardware_keycode,
|
||||
guint *evdev_keycode);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_INPUT_DEVICE_H__ */
|
||||
|
Reference in New Issue
Block a user