SUMMARY I am trying to implement the detection of caps lock in my application for Wayland. This in itself already requires around 30 lines of code using KWayland (way worse with the plain C API), compared to the single-line solutions for Windows or macOS or the three lines for X11, but worst of all, I noticed that the modifier change event is called both on key press and key release with different bit flags set. The first activation has bit #2 set, the second activate does not, so my application thinks that caps lock had been released again until I press any other key, which triggers the event a third time. I thought at first that this was just a bug in my implementation, but then I noticed that the caps lock indicator in the Plasma tray has the same issue and is only shown as long as I hold caps lock down. STEPS TO REPRODUCE 1. subscribe to KWayland::Client::Keyboard::modifiersChanged() for a keyboard 2. log the status of the `locked` bitmask 3. press and release caps lock OBSERVED RESULT Event is triggered a second time on key release with `locked & 0x10 == 0`. EXPECTED RESULT Event is either triggered only on key press or key release does not unset the caps lock bit SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Neon KDE Plasma Version: 5.17.80 KDE Frameworks Version: 5.64.0 Qt Version: 5.13.1 ADDITIONAL INFORMATION I tried using the KDE-proprietary org_kde_kwin_keystate protocol extension as an alternative that requires fewer LOCs, but the compositor doesn't even announce this extension.
Can you share a simple example program and/or a wayland log of the wrong behavior you are seeing?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!