Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_keyboard.c:
+ if ((have_pressed_keys = keyboard->have_pressed_keys_on_enter)) + { + pressed_keys = keyboard->pressed_keys_on_enter; + wl_array_init(&keyboard->pressed_keys_on_enter); + keyboard->have_pressed_keys_on_enter = FALSE; + } pthread_mutex_unlock(&keyboard->mutex);
set_current_xkb_group(xkb_group);
+ /* Update the modifier key press state first, so that subsequent pressed + * keys will be modified accordingly and the lock state state logic, which + * depends on having mod key events before modifiers, will work properly. */ + if (have_pressed_keys) update_keyboard_pressed_keys(hwnd, &pressed_keys, TRUE); update_keyboard_lock_state(hwnd, keyboard->xkb_state); + if (have_pressed_keys) update_keyboard_pressed_keys(hwnd, &pressed_keys, FALSE); Same thing here, updating the state of non-modifier keys might be desired, but sending keyboard input feels wrong.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5712#note_71274