This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bind keyboard shortcuts to specific applications

Tags: None
(comma "," separated)
victorc
Registered Member
Posts
4
Karma
0
For example, I would like to press ctrl+win+b to switch to google chrome (or start it if it's not already running). Is there a way to do this in KDE?
airdrik
Registered Member
Posts
1854
Karma
5
OS
You can add a custom shortcut in System Settings -> Shortcuts and Gestures -> Custom Shortcuts. You can set up shortcuts to launch basically any command (e.g. /usr/bin/google-chrome).

As for the activate-or-launch behavior, you should be able to configure that in Chrome (if you haven't already).
If there are other apps that you want to create shortcuts for that don't provide this behavior, let us know and we'll see what we can figure (there may be something you can do with a dbus command).


airdrik, proud to be a member of KDE forums since 2008-Dec.
victorc
Registered Member
Posts
4
Karma
0
Thanks for the tip. How do you config that in chrome?

I have settled for the wmctrl command combined with custom shortcuts for activation, and then a separate shortcut for opening. It would be much appreciated if we can just set the activate-or-launch behavior globally (like the default in macOS).

airdrik wrote:You can add a custom shortcut in System Settings -> Shortcuts and Gestures -> Custom Shortcuts. You can set up shortcuts to launch basically any command (e.g. /usr/bin/google-chrome).

As for the activate-or-launch behavior, you should be able to configure that in Chrome (if you haven't already).
If there are other apps that you want to create shortcuts for that don't provide this behavior, let us know and we'll see what we can figure (there may be something you can do with a dbus command).
airdrik
Registered Member
Posts
1854
Karma
5
OS
hmm.. I'm not sure how/if Chrome allows you to configure that. I generally use Firefox which has a setting: "Open new windows in a new tab instead" and assumed that Chrome had a similar setting.
From my googling on the subject it looks like perhaps the closest would be to see if there's a good extension to do that (I saw one that will force new windows to be joined with the first as new tabs).


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]