By the Fading Light
of an evanescing moon

By the Fading Light

Quick Tip: Fabricate a Windows Key

May 16th, 2006

For quite a while keyboards have shipped with what most people call the “windows key”. Most windows users know it as the key to open the start menu, and more advanced users know the shortcuts that go along with it, such as Win+L to lock the workstation, and Win+D to minimize all windows. This can come in handy for your X11 window manager as well, but not all of use are fortunate enough to have a microsoft tagged keyboard. And sometimes those older keyboards are just better! ( And sometimes we spill our drink, don’t mix alcohol with linux while in knowledge of the root password and or the hardware ).

Anyways, if you want to take advantage of these shortcuts in your favorite window manager, you are going to need a key to use in place of it. Fortunately I have the perfect suggestion. The most useless key for almost anyone who has surpassed touch typing, is the caps lock key. Not to mention that it gets in the way sometimes. Simple add the following lines into a file in your home directory, such as ~/.xmodmap

remove Lock = Caps_Lock
keysym Caps_Lock = Super_L

Now (if you’re using bash) edit your ~/.bashrc and add a line that says:

xmodmap ~/.xmodmaprc > /dev/null 2>&1

On the next start of X, your caps lock key will no longer toggle the light, or effect the capitilization. It will also be sending the keycode for the winkey! If you would like the changes to take affect immediately, simply run the command you added to your bashrc:
xmodmap ~/.xmodmap
You could also consider adding this to the startup of your window manager, so that it’s only run once. Under KDE this may be accomplished by putting a link to the command in ~/.kde/Autostart/

This can be a big help if you want a function desktop without paying up for a shiny new keyboard.

Leave a Reply

Name

Mail (never published)

Website