Summary: | Importing and exporting shortcuts ignores custom command shortcuts that take the form of .desktop files in ~/.local/share/applications | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Will Styler <will> |
Component: | kcm_keys | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 4wy78uwh, bharadwaj.raju777, kde, kdedev, nate |
Priority: | NOR | ||
Version: | 6.1.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/-/commit/b88e3456c2499c73e520407959af31d4d45a1925 | Version Fixed In: | 6.2.0 |
Sentry Crash Report: |
Description
Will Styler
2024-06-22 18:09:59 UTC
So, a bit more poking has revealed the issue, and allowed me to accomplish the task. Apparently, the custom shortcut commands are stored in ~/.local/share/applicatons as .desktop files. If you copy those over first, then copy in .globalshortcutsrc, then restart, the commands will work as anticipated. This is wildly unintuitive, though, and I would suggest that either: 1) This behavior be modified so that one file contains all the information needed, for easier cross-machine syncing 2) The shortcut-related desktop files be placed in a subfolder, so they can be synced too 3) The import/export chain automatically creates these desktop files Thanks! Apparently your shortcuts were created using KHotkeys, which had been deprecated for 8 years and was removed with Plasma 6.1. There was a migration script to move simple ones over to the newer KGlobalAccel system, but we're aware it's not perfect. And unfortunately it can never be due to different sets of functionality between the two systems. It would probably be best to re-create them all from scratch to ensure they work properly with the newer KGlobalAccel system. (In reply to Nate Graham from comment #2) > Apparently your shortcuts were created using KHotkeys, which had been > deprecated for 8 years and was removed with Plasma 6.1. > > There was a migration script to move simple ones over to the newer > KGlobalAccel system, but we're aware it's not perfect. And unfortunately it > can never be due to different sets of functionality between the two systems. > > It would probably be best to re-create them all from scratch to ensure they > work properly with the newer KGlobalAccel system. It's true that old shortcuts don't migrate, and khotkeys is abandoned, but even creating a new shortcut on a fresh install with Plasma 6, it doesn't appear to be possible to import custom shortcuts created in Plasma 6 on a different machine. So, this is not just an 'old shortcuts'. I recreated everything in Plasma 6, then went to migrate another machine to Fedora 40 and couldn't import without the desktop file hack below. Let's back up. When you wrote ~/.config/kglobalhotkeysrc, did you mean ~/.config/kglobalshortcutsrc? (In reply to Nate Graham from comment #4) > Let's back up. When you wrote ~/.config/kglobalhotkeysrc, did you mean > ~/.config/kglobalshortcutsrc? Yes, I'm sorry, I meant 'kglobalshortcutsrc', as I put in the title. I typoed later. Got it. I thought you were talking exclusively about khotkeys. Can confirm the issue. In progress with https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2447. Git commit b88e3456c2499c73e520407959af31d4d45a1925 by Akseli Lahtinen. Committed on 23/08/2024 at 15:46. Pushed by akselmo into branch 'master'. kcm_keys: fix importing custom commands This adds new handling for Custom Commands, such as exporting them as their own group. It also adds a signal that's emitted when an application is added to the list. When the signal is emitted, we re-import our config file to add the missing data. This is because otherwise we'll face asynchronicity issues. Most of the work was done by David Redondo already, I just applied his patch and modified it. FIXED-IN: 6.2.0 M +1 -1 kcms/keys/basemodel.cpp M +1 -0 kcms/keys/globalaccelmodel.cpp M +1 -0 kcms/keys/globalaccelmodel.h M +53 -2 kcms/keys/kcm_keys.cpp M +1 -1 kcms/keys/kcm_keys.h https://invent.kde.org/plasma/plasma-desktop/-/commit/b88e3456c2499c73e520407959af31d4d45a1925 |