emvaized / kde-snap-assist

KWin script for KDE Plasma which suggests other window thumbnails on snap
https://store.kde.org/p/1875687
GNU General Public License v3.0
97 stars 6 forks source link

[Bug] Keyboard inputs get swallowed #43

Open mstarongithub opened 10 months ago

mstarongithub commented 10 months ago

With the Snap Assist Kwin script active, keyboard inputs don't make it to search fields or receivers. The only exception that I could find was the Meta key.

System information:

Operating System: Fedora Linux 38 KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 6.4.11-200.fc38.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600X 6-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon RX 6600 XT Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7B85 System Version: 1.0

emvaized commented 10 months ago

Hi there! The script absorbs keyboard events in order to make it possible to select window with arrow keys + enter, when the Assist window is visible on the screen. And if it didn't, you won't be able to interact with the other window anyway, as it will not have the keyboard focus.

Snap Assist works in such way that when any window gets snapped, the script shows it's own borderless window on the other side of the screen – and it gets focused in order to be raised on top of any other window.

mstarongithub commented 10 months ago

Thanks for the explanation. However, this just changes it from a technical problem to a UX problem. As an end-user, if I select a text box or open a game in full screen, I'd expect my keyboard input to be sent there.

I have no experience with kwin scripting, so I can't offer ideas on solutions

emvaized commented 10 months ago

Keyboard input should only be consumed when the Assist window is visible on the screen. If it is consumed when it's hidden (no window was snapped by screen edge), then it's a bug.

mstarongithub commented 10 months ago

Oh yea, then it definitely is a bug. I tried it with Firefox's search bar in maximized mode, the KDE settings search bar with the app itself just in generic floating mode, with the search bar in the default app grid thing (don't remember the applet name rn) and with Powerwasher Simulator in exclusive full screen. For the search bars any input unfocused them and then prevented me from selecting them again while PWS didn't receive any inputs whatsoever except for mouse. The only key that worked consistently was Meta.

Edit: There's also a reddit post about the same problem. The solution was to disable snap assist. Link

emvaized commented 10 months ago

I see. I noticed that you're using Wayland – there has been an issue similar to yours. Perhaps the Reddit post you referred to was created before the fix, as it's 1 year old.

Are you aure you're running the latest version of KDE Snap Assist (1.6.2)?

hewlett-packard-lovecraft commented 8 months ago

+1 - I've been having the same issue, also with Fedora 38 KDE Wayland on KDE Snap Assist 1.6.2

It seems to work after install but after I reboot I start having issues. Although keyboard shortcuts seem to work, whenever I start typing I lose focus of whatever window I'm on. The problem seems to go away when using X11