KDE 4.3 Keyboard Shortcuts

I wanted to create a keyboard shortcut for locking the screen on my Fedora machine. I wasn’t sure what to do and my Google searches on what seemed the right terms weren’t too helpful either. It took some poking around but I finally put it together. If you are in the same boat, I’m hoping this will help you out and save you some leg work. (And by the time I need to do it again I’ll have probably forgotten some of it and need this too. :) Everything here was done on KDE 4.3.4, Fedora 11. Click on the little pictures for bigger pictures.

The place to start is System Settings. I have System Settings as one of my favorites in my application launcher, but thankfully it doesn’t matter where you have it. Just search for “System Settings” in your launcher and there it will be.

system_settings

There are two items in the Systems Settings that we’ll look at. They are “Input Actions” and “Keyboard & Mouse”. Which hopefully makes sense. Keyboard & Mouse is where we will go to see what keyboard shortcuts are in place. Input Actions is where we will go to create a new shortcut.

sysset_inputact sysset_keymouse

Opening Keyboard & Mouse, we can see a few items on the left side such as Keyboard, Mouse, Joystick, Standard Keyboard Shortcuts and Global Keyboard Shortcuts. We are of course interested in the keyboard shortcuts. It is worth taking the time to click on both and see what is already defined. Many in the Standard Keyboard Shortcuts should look familiar. There may be some you don’t know. They can be changed right here. Would you like copy to be ctrl+v and paste to be ctrl+c? Go ahead and switch them around. Some are not defined, you could do so if you like.

sysset_standard

Global Keyboard Shortcuts is set up a bit differently. The shortcuts are grouped by KDE Component. I am currently unaware of any way to view them (or search them) all at once. This is unfortunate, hopefully it will be corrected in the future, and may already be fixed. One of the reasons I love Fedora is the frequent updates. But back to global shortcuts, here are a couple assigned to the KDE Daemon for changing monitor brightness, not something I use with my desktop machine but a real must for laptops.

sysset_global

I have to confess, my expectation was that I would add what I wanted here, much like how I would change standard shortcuts here. That is not the case. To add global shortcuts we need to move back to System Settings and choose Input Actions. Then in the left panel, we need to right click to get a drop down menu. The options I used are New -> Global Shortcut -> D-Bus Command. This will immediately create a space to type in a name for the new shortcut. Oddly enough, I called mine “Lock Screen”. Here are both steps.

new_global_dbus Typing a new name for the global shortcut.

What remains is to fill in the three tabs on the right, “Comment”, “Trigger” and “Action”. The first two are drop dead easy. For the comment type in whatever comment you want to have. For the trigger, I just clicked on the little button with a wrench, and then pressed the keys I wanted to use. In this case it was Ctrl+Alt+Del, so that this matches what I do to lock a Windows machine.

new_global_comment new_global_trigger

The last part took just a touch longer to crack. As you may remember I’d chosen to make this shortcut a D-Bus Command. Well, here is where I tell it just which D-Bus command I want kicked off by this key combination. It took a bit of digging, but if you look to the bottom of the “Action” tab you’ll see two buttons. One says “Call” and the other “Launch D-Bus Browser”. Browser sounded good so I clicked on it and started browsing. There’s a ton of stuff in there and it was a bit overwhelming. Google helped sort things out. Here I will insert a word of caution. I learned that double clicking on an entry in “Methods” would fire it off. This could potentially be an issue, tread lightly. Why did I double click something? I was sort of hoping I could pick what I wanted, double click it and have the Action tab automagically populated. No such luck. Another great potential feature for this software. So once I found what I wanted, the method to lock the screen, I needed to figure out how to fill in the tabs. Fortunately the Call button let me test my attempts to get it right. Again, I’d be a bit careful here depending on what kind of stuff you are calling, but for locking the screen, I was good. I’ve got shots below of the blank form, the browser showing what method I wanted and then the action tab properly filled in for that method. After that it was just a matter of hitting “Apply” to make it stick. The last screen shot is back at Global Shortcuts under Keyboard & Mouse – showing that my Lock Screen shortcut has been added to the KDE Component khotkeys.

new_global_action_blank new_global_viewer new_global_viewer_filled done

It is possible to do this other ways. This is the one that I am most comfortable using, but if you are aware of an issue with how I’ve gone about this, please let me know. There’s a ton more available in Input Actions, like gestures and the ability to run a command or load a url. This is where one could connect special keys on a keyboard to their desired actions. Just click the wrench button on the trigger tab and hit the key you want. If your choice is already bound to some action, you should get a message box that pops up and lets you know. Maybe I’ll follow this up with some more ways to set up Input Actions. It’s a great utility that can really increase productivity.

Posted in Geeks In Action, Linux, OS Tagged with: , , , ,
One comment on “KDE 4.3 Keyboard Shortcuts
  1. Jay Fitz says:

    Hi,

    This may have been introduced with a later version of KDE but it is now possible to reassign the existing global keyboard shortcut to what ever you want to use to lock your screen (in my case Win+l)

    Open up System Settings, Keyboard and Mouse, Global Keyboard Shortcuts, Click the KDE Components drop down and select “Run Command Interface” within there you should see Lock Session assigned to Ctrl + Alt + l, Highlight it, click on custom and then where is says none and this will change to input, hit what ever keyboard combo that you want to use and apply,

    Jay

Leave a Reply

Your email address will not be published. Required fields are marked *

*