Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from KHotkeys to KGlobalAccel for custom command shortcuts #18

Closed
opl- opened this issue May 17, 2023 · 0 comments · Fixed by #24
Closed

Migrate from KHotkeys to KGlobalAccel for custom command shortcuts #18

opl- opened this issue May 17, 2023 · 0 comments · Fixed by #24

Comments

@opl-
Copy link

opl- commented May 17, 2023

As explained here, KHotkeys has been deprecated in favor of KGlobalAccel. As such, I've done some investigative work to determine what the "Add Command..." button does in the Shortcuts system settings menu.

Creating a new command creates a new .desktop file in ~/.local/share/applications/, containing the following:

[Desktop Entry]
Exec=test
Name=test
NoDisplay=true
StartupNotify=false
Type=Application
X-KDE-GlobalAccel-CommandShortcut=true

This file is then referenced in ~/.config/kglobalshortcutsrc:

[test-2.desktop]
_k_friendly_name=test
_launch=none,none,test

I believe the .desktop file can be named anything, as long as it is unique.

References:

@opl- opl- changed the title Migrate from KHotkeys to KGlobalAccel for custom comand shortcuts Migrate from KHotkeys to KGlobalAccel for custom command shortcuts May 17, 2023
nazarewk added a commit to nazarewk/plasma-manager that referenced this issue Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant