Bug 501521 - Keyboard Shortcut Import/Export fails with custom commands
Summary: Keyboard Shortcut Import/Export fails with custom commands
Status: REPORTED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.11.0
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-15 04:01 UTC by Will Styler
Modified: 2025-03-15 22:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Styler 2025-03-15 04:01:11 UTC
SUMMARY

Currently, import/export of KDE Shortcuts in Plasma 6 is broken when you have custom command keyboard shortcuts.  I've tried a few different approaches, and have never been able to get import/export to work.

Please see below for a minimal setup to reproduce, which currently uses a bash script which allows me to give a single argument and in turn triggers the correct response (allowing me to update keystroke effect without messing with KDE shortcuts. But this reproduces with any bash I've tried.

Also note that on the same systems, Importing and Exporting non-custom commands (e.g. kwin commands, etc) works fine on the same systems, provided that Custom Command shortcuts are not included in the export.

STEPS TO REPRODUCE
1. Create a series of shortcuts using '+ Add New' which each has the below format:

Command: ~/Documents/bin/keylaunch a
Name: a
Custom Shortcut: Meta+Ctrl+Alt+A

Command: ~/Documents/bin/keylaunch b
Name: b
Custom Shortcut: Meta+Ctrl+Alt+B

(and so on, my current setup has keybinds for _ @ % + 1 A B C D E F G N P Q R S T W X)

2. Select 'Export...', then select 'Commands' select all checkbox
3. Save to a file
4. Open a new install of KDE
5. Open Shortcuts
6. 'Import...' that file

EXPECTED RESULT

The Commands in the new install will replicate the entries made above

OBSERVED RESULT

The process fails. This often fails with a 'Lost Contact with Global Shortcuts Service' (or similar, sorry, I've forgotten the wording). Generally speaking, 5-6 of the shortcuts will be created, but often with inconsistences (e.g. wrong shortcut keystroke, or duplicate entries. Generally speaking, the Shortcuts window ends up in a strange and fragile state until login, with failures as new custom commands are created.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland

(I've experienced this across Intel and AMD systems while trying to set up new systems.)