Using the Super Key in Xfce

Update: Ksuperkey is in the Korora repo now and included in Korora Xfce 24.

One of the restrictions in Xfce is that you can’t use a key as both a shortcut key and a key modifier. I have often seen questions about this particularly as regards the Super (aka Win) key. It is often set to open the menu whether the default menu or WhiskerMenu is used. If it is also used as a modifier, i.e. in a combination with another key as a shortcut, the menu will be opened as well as the action called by the shortcut.

A question from another Korora team member reminded me of Ksuperkey and looking at the Github page for the project I noted a comment that while it was written for KDE it should work in other Desktop Environments including Xfce. That sounded like it was worth checking out.

Unfortunately Ksuperkey is no longer packed for Fedora 23 so can’t just be installed in Korora. However it is simple to build. I followed this guide, replacing yum with dnf, and it worked without any issues.

If used without any options Ksuperkey calls alt + F1 which in Korora opens the menu by default. I removed that shortcut as I use whiskermenu. In Korora the Super key is used to open WhiskerMenu so in Settings – Keyboard – Shortcuts I edited that to use Alt + F1. Next I ran ksuperkey from alt + F2 and tested. I had previously configured some shortcuts to open applications using Super + other keys so I could easily test. The applications opened and the menu didn’t appear. When used by itself the super key opened WhiskerMenu. Exactly what I hoped to achieve and what was promised.

Lastly I added ksuperkey to Settings – Sessions and Startup – Application Autostart so I didn’t need to run it manually each session.

Ksuperkey adds useful and needed functionality to Xfce and probably other Desktops and is a worthy addition. It has a number of options that can tailor its operation to different situations, see the Usage section on the project page. Don’t be misled by the name, Ksuperkey doesn’t have a bunch, or even any, KDE dependencies that will be added to your system. Its name merely reflects it’s heritage.

Keyboard Shortcuts

I may have mentioned earlier that I have set up keyboard shortcuts for menu items I use daily. But since I updated to KDE 4.3 I have noticed a change in the way shortcuts are set up.

Previously I right clicked on the menu icon and selected menu editor. Next I found the app I wanted to create a shortcut for and then I went to the advanced tab and entered the key combination.

I still do that but now an additional step is required. I need to go the System Settings then Input Actions and the shortcuts I have created are there but not activated. Adding a tick to each shortcut activates it and it starts to work. I’m not sure if this is a bug or a change that was added for a reason but it seems an unnecessary complication.

Multimedia Keyboards and Linux

This is something I didn’t intend to do. When I bought my new keyboard I was after an ergonomic design to reduce the strain of typing. Any other features were a case of “oh um that’s nice”. But now I’m addicted.

I got a Microsoft Natural 4000 which is one of their ergonomic designs with a raised centre area that slopes away towards the sides. It has a front support which makes it slope towards the monitor too. It sounds all wrong. I’ve always had keyboards that went the other way. However it works and works well. It took only a short time to get used to the new position but it felt more comfortable straight away.

One day I was looking at all the other keys across the top and human nature being what it was I started poking at them. I was surprised to find some worked under Ubuntu. But only a couple, the mail and volume up and down seemed to be it. When I loaded Fedora I found the situation was the same with Gnome but nothing worked with KDE. I started to wonder why and did some research.

I found this site that talked about lineak. I found it is in the Fedora repositories and installed it. I followed the details he provided and found my keyboard was supported. Soon I had a few more keys working. The web/home and the search key still didn’t work but all the audio controls work with Amarok and the calculator key started kcalc. Even the forward and back keys worked with Amarok.

Following the info in that post I used xev to check the codes for the 2 keys that weren’t working and found the wrong codes for my keyboard was in the /etc/lineakkb.conf file. When I fixed that they started to work. The correct codes are 178 for the web/home key and 229 for the search key, it seems they changed during an upgrade to the design.

Using xev I also found that the Favourites keys do not report keycodes so they probably can’t be made to work.

What about negatives? Well there are a couple. It appears that lineak is not currently under development. There has been no new work for some time and no new keyboards are being added to the configuration. However it is easy to add your own, see the post mentioned above for details.

Second problem is it takes a while to load the configuration when booting up. This isn’t a major problem unless you reboot or close and open new sessions regularly.

There are some other options that I haven’t tried yet. Quirk seems to concentrate on laptops. Another option is keytouch which appears worth a look although it doesn’t support my keyboard (yet!?).

Blogged with Flock

Tags: , , , , ,