SUMMARY Using keyboard shortcuts to suspend/disable the night light mode does not work when pressing enter but only when pressing space STEPS TO REPRODUCE 1. Open Brightness and Color Widget 2. Find your way to the Night Light Suspend switch with TAB 3. Toggle it using ENTER 4. Toggle it using SPACE OBSERVED RESULT Both key presses toggle the switch but only toggling it using SPACE results in the nightlight being suspended EXPECTED RESULT Both key presses should toggle the switch and suspend the night light mode SOFTWARE/OS VERSIONS Operating System: Fedora Linux 41 KDE Plasma Version: 6.3.1 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.12.15-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics Memory: 30.6 GiB of RAM Graphics Processor: AMD Radeon 780M
Created attachment 178850 [details] The switch being toggled with ENTER and SPACES but only some of them have an effect
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/524
Git commit 611699d9aae7061b96e306370728271277334de5 by Christoph Wolk. Committed on 25/02/2025 at 10:01. Pushed by cwo into branch 'master'. applets/brightness: fix Return press on switch The "Suspend" switch for Night Light calls toggle() on space/enter/ return press, and handles the onToggled() signal to actually perform the action. The qqc2 api is exceptionally confusing here, toggle() refers to changing the checked state of a button, but does not automatically call toggled() which is called when a user interactively manipulates a control, and would need to be called explicitly in the handler. The only reason it worked for Space is that the event wasn't accepted, so the switch called toggled() internally. Instead, just use clicked() and avoid the whole messy toggled/toggle() situation. Along the way, we also explicitly accept the onPressed events when we handle them, to avoid problems with multiple activation in the future. FIXED-IN: 6.3.2 M +5 -3 applets/brightness/package/contents/ui/NightLightItem.qml https://invent.kde.org/plasma/powerdevil/-/commit/611699d9aae7061b96e306370728271277334de5
Git commit 2ac969859626964802cf63300baec54f036f9425 by Christoph Wolk. Committed on 25/02/2025 at 10:35. Pushed by cwo into branch 'Plasma/6.3'. applets/brightness: fix Return press on switch The "Suspend" switch for Night Light calls toggle() on space/enter/ return press, and handles the onToggled() signal to actually perform the action. The qqc2 api is exceptionally confusing here, toggle() refers to changing the checked state of a button, but does not automatically call toggled() which is called when a user interactively manipulates a control, and would need to be called explicitly in the handler. The only reason it worked for Space is that the event wasn't accepted, so the switch called toggled() internally. Instead, just use clicked() and avoid the whole messy toggled/toggle() situation. Along the way, we also explicitly accept the onPressed events when we handle them, to avoid problems with multiple activation in the future. FIXED-IN: 6.3.2 M +5 -3 applets/brightness/package/contents/ui/NightLightItem.qml https://invent.kde.org/plasma/powerdevil/-/commit/2ac969859626964802cf63300baec54f036f9425