applets/taskmanager: Add global shortcuts for cycling and moving tasks
Summary
Adds four new global keyboard shortcuts to the Task Manager applet:
| Action | Default Shortcut |
|---|---|
| Activate Previous Task | Meta+Ctrl+PageUp |
| Activate Next Task | Meta+Ctrl+PageDown |
| Move Active Task Backward | Meta+Ctrl+Shift+PageUp |
| Move Active Task Forward | Meta+Ctrl+Shift+PageDown |
- Activate Previous/Next: Cycles through open windows (skipping launchers), wrapping around at the edges.
- Move Backward/Forward: Reorders the active task within the task list.
Architecture
Shortcuts are registered in the taskmanager's Backend class, using a single process-lifetime KActionCollection paired with a static instance registry. This ensures:
- Shortcuts work with multiple panels (including on different screens).
- Shortcuts survive panels being dynamically added or removed (e.g. screen hotplug).
- Existing user shortcut customizations under the "plasmashell" component are preserved.
- The existing Meta+1–9 shortcuts continue to work unchanged.
Known limitations
- The move shortcuts require the Task Manager's sorting to be set to "Manual" and grouping disabled to have any effect.
- With grouping enabled, only the most-recent group item is focused; moving grouped items is not currently supported.
- The default shortcuts are a proposal. Feedback welcome on whether they should be enabled by default.
Testing
Tested on a dual-screen setup with both icons-only and icons+text task managers:
- Shortcuts work regardless of which screen has focus, affecting only the focused screen's taskmanager applet, if any.
- Shortcuts continue working after disconnecting and reconnecting a screen.
- Launchers are correctly skipped during cycling.
- No regressions with existing Meta+1–9 shortcuts.
Notes
This MR previously required the companion MR plasma-workspace!6756 (closed). The implementation now lives entirely in the taskmanager applet, as requested in review.
Edited by Salman Farooq