mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 23:03:00 +00:00
evdev: fix X11 to evdev keycode translation
Hardware keycodes in Clutter events are x11 keycodes, which are the same as evdev + 8, but we need to reverse the translation when explicitly asked for an evdev keycode. https://bugzilla.gnome.org/show_bug.cgi?id=705710
This commit is contained in:
parent
26b2852601
commit
a3557f7a2f
@ -123,9 +123,11 @@ clutter_input_device_evdev_keycode_to_evdev (ClutterInputDevice *device,
|
|||||||
guint hardware_keycode,
|
guint hardware_keycode,
|
||||||
guint *evdev_keycode)
|
guint *evdev_keycode)
|
||||||
{
|
{
|
||||||
/* The hardware keycodes from the evdev backend are already evdev
|
/* The hardware keycodes from the evdev backend are almost evdev
|
||||||
keycodes */
|
keycodes: we use the evdev keycode file, but xkb rules have an
|
||||||
*evdev_keycode = hardware_keycode;
|
offset by 8. See the comment in _clutter_key_event_new_from_evdev()
|
||||||
|
*/
|
||||||
|
*evdev_keycode = hardware_keycode - 8;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user