SUMMARY: Keyborad shortcuts set to meta+x, but don't work when pressed SOFTWARE/OS VERSIONS: Linux/KDE Plasma: ArchLinux(kernel: 6.7.9-arch1-1) KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2
What shortcut did you bind to meta+x ? Every widget in the system tray seemed to work fine for me.
(In reply to duha.bugs from comment #1) > What shortcut did you bind to meta+x ? Every widget in the system tray > seemed to work fine for me. System Settings -> Keyboard -> Shortcuts -> plasmashell -> Activate System Tray Widget I bind the shortcut to Meta+x, but it doesn't seem to work. This problem only appeared after I upgraded to plasma 6, before that everything was fine
Thanks. Can reproduce -> confirming
Can also confirm.
*** Bug 491987 has been marked as a duplicate of this bug. ***
*** Bug 500137 has been marked as a duplicate of this bug. ***
*** Bug 501294 has been marked as a duplicate of this bug. ***
*** Bug 502657 has been marked as a duplicate of this bug. ***
# Fix System Tray widget global shortcuts not working ## Summary This patch fixes a bug where global keyboard shortcuts assigned to the System Tray widget are registered in kglobalaccel but do not activate the widget. The root cause is that System Tray disconnects the default `activated` signal handler but never connects its own. **This is a regression introduced in Plasma 6.0 during the nested containment refactoring and remains unfixed in master as of November 2025.** ## Bug Description **Affected versions:** Plasma 6.0 - 6.5.2, master **Regression from:** Plasma 5.21+ (where it worked correctly) **Severity:** Medium - Feature regression from Plasma 5 **Git history verified:** Bug NOT fixed in any version 6.0+ When users assign a global shortcut to the System Tray widget through the GUI (Configure System Tray → Keyboard Shortcuts): 1. The shortcut is saved in configuration 2. The shortcut is registered in kglobalaccel 3. Pressing the shortcut sends the `activated` signal 4. **Nothing happens** - the System Tray does not expand This works correctly for other widgets like Analog Clock, which use the default `PlasmoidItem` handler. ## Root Cause In `plasma-workspace/applets/systemtray/systemtray.cpp` lines 63-67, the System Tray explicitly disconnects the `activated` signal from child applets: ```cpp // we don't want to automatically propagate the activated signal from the Applet to the Containment // even if SystemTray is of type Containment, it is de facto Applet and should act like one connect(this, &Containment::appletAdded, this, [this](Plasma::Applet *applet) { disconnect(applet, &Applet::activated, this, &Applet::activated); }); ``` However, **no handler is connected for the System Tray's own `activated` signal**, unlike other widgets which inherit the default behavior from `PlasmoidItem` (plasma-framework/src/plasmaquick/plasmoid/plasmoiditem.cpp:99-105). ## Verification ```bash # Shortcut IS registered in kglobalaccel $ qdbus6 org.kde.kglobalaccel /component/plasmashell \ org.kde.kglobalaccel.Component.allShortcutInfos | grep "activate widget" # Shows: [Argument: ai {234881108}] ✓ # Signal IS sent when shortcut is pressed $ qdbus6 org.kde.kglobalaccel /component/plasmashell \ org.kde.kglobalaccel.Component.invokeShortcut "activate widget 8" # Executes without error ✓ # But System Tray does NOT respond ✗ ``` ## Solution Add a QML handler for the `activated` signal in the System Tray's main.qml to toggle the expanded state. ## Changes **File:** `applets/systemtray/package/contents/ui/main.qml` After the `Component.onCompleted` block (line 46), add: ```qml // BUGFIX: Handle activated signal to toggle expansion (for global shortcuts) Connections { target: Plasmoid function onActivated() { systemTrayState.expanded = !systemTrayState.expanded; } } ``` ## Testing 1. Right-click System Tray → Configure System Tray 2. Go to Keyboard Shortcuts tab 3. Assign a shortcut (e.g., Ctrl+Alt+Shift+T) 4. Click Apply 5. Press the assigned shortcut 6. **Expected:** System Tray popup appears/disappears 7. **Before patch:** Nothing happens 8. **After patch:** System Tray toggles correctly ✓ ## Related Code - **plasma-framework/src/plasmaquick/plasmoid/plasmoiditem.cpp:99-105** - Default activated handler that works for other widgets - **plasma-workspace/shell/kconf_update/plasma6.0-remove-old-shortcuts.cpp** - Migration script that mentions widget shortcuts should be handled explicitly in Plasma 6 ## Related Commits - **0411253613** (Oct 2020, Plasma 5.21) - Original fix that worked in Plasma 5 by adding `setGlobalShortcut()` in `restoreContents()` and the `disconnect()` line - **46ada24fd8** (Mar 2024, Plasma 6.0) - Refactored to nested containment, regression likely introduced here - **9c872a5428** (Jun 2024, Plasma 6.2) - Fixed shortcuts for child applets **inside** System Tray, but not for System Tray itself - **cb73a963c0** (Feb 2025, master) - Focus improvements, unrelated to shortcuts **Analysis:** The bug has been present since Plasma 6.0 and remains unfixed in master (verified Nov 2025). ## Notes - This regression was introduced in Plasma 6.0 when the automatic signal propagation was removed - The comment in systemtray.cpp indicates this was intentional, but no replacement handler was added - Other containment-based widgets may have the same issue and need similar fixes - This does not affect widgets that use the standard `PlasmoidItem` behavior - This bug can also occur in other widgets, such as Media Frame. ## Checklist - [x] Patch applies cleanly to v6.4.5 - [x] Tested on Kubuntu 25.10 with Plasma 6.4.5 - [x] No compilation warnings introduced - [x] Feature works as expected after patch - [x] Does not affect other System Tray functionality - [x] Follows existing code style (QML Connections pattern) --- **Patch file:** `systemtray-activation-fix.patch`: https://bugs.kde.org/attachment.cgi?id=186718 (from https://bugs.kde.org/show_bug.cgi?id=511981) **Reported by:** Mikhail Pavlovich Sidorenko via Cursor **Tested on:** KDE Plasma 6.4.5, KDE Frameworks 6.17.0, Qt 6.9.2 **Date:** 2025-11-12
(In reply to Mikhail Pavlovich Sidorenko (Михаил Павлович Сидоренко) from comment #9) > # Fix System Tray widget global shortcuts not working > > ## Summary > > This patch fixes a bug where global keyboard shortcuts assigned to the > System Tray widget are registered in kglobalaccel but do not activate the > widget. The root cause is that System Tray disconnects the default > `activated` signal handler but never connects its own. > > **This is a regression introduced in Plasma 6.0 during the nested > containment refactoring and remains unfixed in master as of November 2025.** > > ## Bug Description > > **Affected versions:** Plasma 6.0 - 6.5.2, master > **Regression from:** Plasma 5.21+ (where it worked correctly) > **Severity:** Medium - Feature regression from Plasma 5 > **Git history verified:** Bug NOT fixed in any version 6.0+ > > When users assign a global shortcut to the System Tray widget through the > GUI (Configure System Tray → Keyboard Shortcuts): > 1. The shortcut is saved in configuration > 2. The shortcut is registered in kglobalaccel > 3. Pressing the shortcut sends the `activated` signal > 4. **Nothing happens** - the System Tray does not expand > > This works correctly for other widgets like Analog Clock, which use the > default `PlasmoidItem` handler. > > ## Root Cause > > In `plasma-workspace/applets/systemtray/systemtray.cpp` lines 63-67, the > System Tray explicitly disconnects the `activated` signal from child applets: > > ```cpp > // we don't want to automatically propagate the activated signal from the > Applet to the Containment > // even if SystemTray is of type Containment, it is de facto Applet and > should act like one > connect(this, &Containment::appletAdded, this, [this](Plasma::Applet > *applet) { > disconnect(applet, &Applet::activated, this, &Applet::activated); > }); > ``` > > However, **no handler is connected for the System Tray's own `activated` > signal**, unlike other widgets which inherit the default behavior from > `PlasmoidItem` > (plasma-framework/src/plasmaquick/plasmoid/plasmoiditem.cpp:99-105). > > ## Verification > > ```bash > # Shortcut IS registered in kglobalaccel > $ qdbus6 org.kde.kglobalaccel /component/plasmashell \ > org.kde.kglobalaccel.Component.allShortcutInfos | grep "activate widget" > # Shows: [Argument: ai {234881108}] ✓ > > # Signal IS sent when shortcut is pressed > $ qdbus6 org.kde.kglobalaccel /component/plasmashell \ > org.kde.kglobalaccel.Component.invokeShortcut "activate widget 8" > # Executes without error ✓ > > # But System Tray does NOT respond ✗ > ``` > > ## Solution > > Add a QML handler for the `activated` signal in the System Tray's main.qml > to toggle the expanded state. > > ## Changes > > **File:** `applets/systemtray/package/contents/ui/main.qml` > > After the `Component.onCompleted` block (line 46), add: > > ```qml > // BUGFIX: Handle activated signal to toggle expansion (for global shortcuts) > Connections { > target: Plasmoid > function onActivated() { systemTrayState.expanded = > !systemTrayState.expanded; } > } > ``` > > ## Testing > > 1. Right-click System Tray → Configure System Tray > 2. Go to Keyboard Shortcuts tab > 3. Assign a shortcut (e.g., Ctrl+Alt+Shift+T) > 4. Click Apply > 5. Press the assigned shortcut > 6. **Expected:** System Tray popup appears/disappears > 7. **Before patch:** Nothing happens > 8. **After patch:** System Tray toggles correctly ✓ > > ## Related Code > > - **plasma-framework/src/plasmaquick/plasmoid/plasmoiditem.cpp:99-105** - > Default activated handler that works for other widgets > - **plasma-workspace/shell/kconf_update/plasma6.0-remove-old-shortcuts.cpp** > - Migration script that mentions widget shortcuts should be handled > explicitly in Plasma 6 > > ## Related Commits > > - **0411253613** (Oct 2020, Plasma 5.21) - Original fix that worked in > Plasma 5 by adding `setGlobalShortcut()` in `restoreContents()` and the > `disconnect()` line > - **46ada24fd8** (Mar 2024, Plasma 6.0) - Refactored to nested containment, > regression likely introduced here > - **9c872a5428** (Jun 2024, Plasma 6.2) - Fixed shortcuts for child applets > **inside** System Tray, but not for System Tray itself > - **cb73a963c0** (Feb 2025, master) - Focus improvements, unrelated to > shortcuts > > **Analysis:** The bug has been present since Plasma 6.0 and remains unfixed > in master (verified Nov 2025). > > ## Notes > > - This regression was introduced in Plasma 6.0 when the automatic signal > propagation was removed > - The comment in systemtray.cpp indicates this was intentional, but no > replacement handler was added > - Other containment-based widgets may have the same issue and need similar > fixes > - This does not affect widgets that use the standard `PlasmoidItem` behavior > - This bug can also occur in other widgets, such as Media Frame. > > ## Checklist > > - [x] Patch applies cleanly to v6.4.5 > - [x] Tested on Kubuntu 25.10 with Plasma 6.4.5 > - [x] No compilation warnings introduced > - [x] Feature works as expected after patch > - [x] Does not affect other System Tray functionality > - [x] Follows existing code style (QML Connections pattern) > > --- > > **Patch file:** `systemtray-activation-fix.patch`: > https://bugs.kde.org/attachment.cgi?id=186718 (from > https://bugs.kde.org/show_bug.cgi?id=511981) > **Reported by:** Mikhail Pavlovich Sidorenko via Cursor > **Tested on:** KDE Plasma 6.4.5, KDE Frameworks 6.17.0, Qt 6.9.2 > **Date:** 2025-11-12 I just want to express my gratitude. I applied the fix and it's gorgeous. Thank you, sir.
Created a Merge Request: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6016
Git commit 0b31aecda67bff6796151060d2fe60083a7b9f3e by Nate Graham, on behalf of Mikhail Sidorenko. Committed on 19/11/2025 at 19:30. Pushed by ngraham into branch 'master'. applets/systemtray: Fix global activation shortcut not working 46ada24fd8c45cdab95bc769847bdd04682f7462 disabled automatic signal propagation, necessitating that onActivated() be manually handled. Handle it here. FIXED-IN: 6.5.4 M +7 -0 applets/systemtray/package/contents/ui/main.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/0b31aecda67bff6796151060d2fe60083a7b9f3e
Git commit fc585dff53d490ca51e0b4589fd9e3d010d79bd3 by Nate Graham. Committed on 19/11/2025 at 19:30. Pushed by ngraham into branch 'Plasma/6.5'. applets/systemtray: Fix global activation shortcut not working 46ada24fd8c45cdab95bc769847bdd04682f7462 disabled automatic signal propagation, necessitating that onActivated() be manually handled. Handle it here. FIXED-IN: 6.5.4 (cherry picked from commit 0b31aecda67bff6796151060d2fe60083a7b9f3e) ca84c829 Fix System Tray global shortcut not triggering popup Co-authored-by: Mikhail Sidorenko <motherlode.muwa@gmail.com> M +7 -0 applets/systemtray/package/contents/ui/main.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/fc585dff53d490ca51e0b4589fd9e3d010d79bd3