A super key for people with real keyboards

How exactly did Microsoft get their logo on a key anyway?

In the Windows world, this is known as the “windows key” or the “win key”.  In Linux, it’s often mapped as the super key.  The new Unity environment (which I still have mixed feelings about) makes heavy use of the super key for window switching and other shortcuts.  Since I use a Model M keyboard from the mid 1980’s on both of my main workstations, I don’t have a windows super key.  Like it or not, Unity will be the default environment in 11.04, so I figure I better at least give it an honest try before I dismiss it.

I set off to figure out how to properly map something else as the super key.  Since I map my control key where the $DEITY intended it to be (i.e. Sun Type 3), the key actually labeled “control” (where most PC users know it to be) is available for this function.  Mapping the super key there would even leave it spatially close to where it is located on 104 key keyboards.

The following in ~/.Xmodmap does what I’m looking for:

! Clear the current control, caps lock, and super bindings
clear control
clear lock
clear mod4
! Make left control be Super_L
keycode 37 = Super_L
add mod4 = Super_L
! Make caps lock be Control_L, and add Control_R back in
keycode 66 = Control_L
add control = Control_L Control_R

Make sure to disable any Gnome layout options (like the Caps/Control swap) before you do this, as it handles the making the incorrectly-labeled caps lock key function as control.  I thought that xinit or Gnome would automatically read this file, but it seemed like that wasn’t happening, so I added the following command to my session:

xmodmap ~/.Xmodmap

If you want to just try it out without making it permanent, you can run the above command at a terminal and make it stick only for the current session.  With this change, I can now use the left control key as super for all the nifty shortcuts.

I do like Unity’s similarity to the NeXTSTEP/WindowMaker environment that I used for many years, but I worry about what it means for regular users who are used to poking around in an Applications (or Start) menu to explore the system and find the tools that they need.  Linux applications aren’t always named according to what they do (Banshee, Vinagre, Firefox, Thunderbird, etc) which makes the search interface not necessarily very appropriate.  I hope that Canonical is not making a fatal mistake with this move, but only time will tell.

Category(s): Linux

Comments are closed.