Hello. I do not want to work hotkeys for media switching (pause, make a track, previous track).
I found a package that helps to do switching (playerctl).
Play/Pause : playerctl play-pause
Stop : playerctl stop
Next : playerctl next
Previous: playerctl
They work well for me in the console.
But I want to set up switching through the corresponding keys.
I’ve searched a lot but haven’t found a solution since in kde Plasma (v 5.26.5), there is no explicit way to set up custom keyboard shortcuts.
Is there a way to set up a custom keyboard shortcut with console binding? Any suggestions, be it additional programs or an example of how to properly edit the /.config/kglobalshortcutsrc file, are welcome.
I believe what you’re looking for can be found by going to Launcher → System Settings.
In the window, in the Workspace section, select the Shortcuts option. On the screen that appears, select the Custom Shortcuts section
On this screen Right-click in the pane, and select New group.
Call the group whatever you like. That’s not important, really. When done, Right-click on the newly added group and select New → Global Shortcut → Command/URL.
On the Trigger tab, set the shortcut you wish:
On the Command tab, set the command you wish to execute when the shortcut is pressed, followed by selecting Apply to, well, apply it.
You should be good to go then. This was my steps and it’s working flawlessly.
Yes. It really works well.
I could not find this settings, although I was looking for a lot.
Thank you very much for the detailed instructions with screenshots.
Aha, missed this one - my favourite section of KDE.
Visit it often. I had an issue, I want unclutter to run when I’m watching Plex… but then need to kill it if Plex isn’t active.
You can also set ‘Shortcuts’ here called Window Actions so that it will execute an action(run unclutter) if Plex is focussed, and another action (kill unclutter) if it’s unfocused.
This page in Settings is so powerful - you can assign a mouse gesture to execute any keyboard shortcut or action or script you can imagine too…