Is there a tool to debug wayland keyboard handling?

When I alt+tab from some programs sometimes it kind of leaks the tab button press to the previously active program, so my text editor adds tabs into random places where my caret happened to be or other program changes the focused form field.

I’m asking where should I start to find out what’s happening? My web searches have left me without an answer.

ps. This is my first message on this forum. I’m welcoming any help on making this and any of my following messages better fitting here.

Your bug sounds like 484992 – Xwayland apps get Tab keyboard events even when they should be filtered out by event filter
There is a workaround in the comments.

But please tell us your plasma version, distro and if you are using Wayland.

1 Like

Thank you meven. The workaround of turning the key reading off fixed it for me. I’m confused why I didn’t find that page in the first place.

Still I’m wondering if there would have been a way to see what and how key presses are send to applications, so I could have figured the issue out by myself. I need to read how the X “emulation” on Wayland works from somewhere.

If I understand correctly, there is.

Open KRunner with Alt+Space, type kwin, and click on KWin Debug Console. One of the tabs shows keyboard input similarly to xev on x11.

2 Likes

To complement the why:
That kind of feature is basically a keylogger a major security hole X11 has had forever by design. Wayland does not, key events are by design only accessible to application they are destined to.