The Wayland specification states about the keyboard leave event:
After this event client must assume that all keys, including modifiers, are lifted and also it must stop key repeating if there's some going on.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56001
---
To replicate a manifestation of the problem: 1. Open notepad 2. Hold down a key, wait for repetition to begin 3. While keeping key pressed, change focus to some other window (e.g. click away) 4. Key keeps repeating in notepad forever (lifting the key has no effect now, since the keyboard focus has been lost)
-- v2: winewayland.drv: Release all keys on keyboard focus loss.