wayland: Fix up key event translation
The is_modifier field is supposed to be set if the key would act as a modifier, not if any modifiers are currently active. To fix this, introduce a private _gdk_wayland_keymap_key_is_modifier function. At the same time, make the hardware_keycode field in key events actually contain the hardware keycode, not a copy of the keyval.
This commit is contained in:
		| @ -1032,10 +1032,9 @@ deliver_key_event(GdkWaylandDeviceData *device, | ||||
|   event->button.time = time; | ||||
|   event->key.state = device->modifiers; | ||||
|   event->key.group = 0; | ||||
|   event->key.hardware_keycode = sym; | ||||
|   event->key.hardware_keycode = key; | ||||
|   event->key.keyval = sym; | ||||
|  | ||||
|   event->key.is_modifier = device->modifiers > 0; | ||||
|   event->key.is_modifier = _gdk_wayland_keymap_key_is_modifier (keymap, key); | ||||
|  | ||||
|   translate_keyboard_string (&event->key); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Matthias Clasen
					Matthias Clasen