Phantom Keypresses when switching windows

Hi all,

I am experiencing a weird problem. When switching windows in Gnome (wayland) I often get phantom keypresses. It occurs when just clicking a different window, when using Alt+Tab or when coming from the overview (are there other ways?).

It doesn’t always occur, sometimes it works as expected, but when it does it is a major pain. I noticed it by every window your clicking scrolling to the beginning or the end. It stops when I press a key on my keyboard.

In order to diagnoes this I kept xev running, and once the issue appeared again (scrolling to the beginning this time), I switched to its window. This lead to this output:

...
KeyPress event, serial 37, synthetic NO, window 0x3a00001,
    root 0x4a4, subw 0x0, time 95914050, (1966,172), root:(4675,1345),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x3a00001,
    root 0x4a4, subw 0x0, time 95914080, (1966,172), root:(4675,1345),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x3a00001,
    root 0x4a4, subw 0x0, time 95914080, (1966,172), root:(4675,1345),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
...

And it just keeps going until I press any key. I have tried updating and rebooting, but it keeps coming back.

Has anyone else experienced this, or have an idea how to debug this?

Cheers!