Change the Capslock and Windows Key Functions in Ubuntu
written by: Lamar Stonecypher•edited by: J. F. Amprimoz•updated: 7/27/2009
Windows users soon learn that it's easy to go to Control Panel and choose "Keyboard" to access properties that allow them to alter or disable keys like Capslock and the Windows (Start) key. Does Ubuntu offer similar capabilities?
slide 1 of 15
Keyboard Properties in Windows
In Windows, going to Control Panel and selecting "Keyboard" opens the "Keyboard Properties" applet. Then under the "Key Settings" tab, the user can choose the key he wants to change. For most keys, the only option is "Disable."
slide 2 of 15
slide 3 of 15
Keyboard Preferences in Ubuntu
The equivalent act in Ubuntu is going to System → Preferences → Keyboard and selecting the Layouts tab. Then click on the "Layout" name and select the "Keyboard Layouts" button. This will provide a list of most of the key assignments that can be altered in Ubuntu.
You may want to check and make sure that Ubuntu has properly identified your keyboard. In my case, it was selected as a "Generic 105-key keyboard." By clicking beside "Keyboard model," I was then able to select "IBM" under "Vendors" and find "IBM ThinkPad R60/T60/R61/T61" under "Models."
The first question to ask is what functionality one desires from the "Windows" key. In Windows, it's often labeled "Start" and pressing it brings up the main menu. Ubuntu defaults to assigning this to Alt+F1, which is non-intuitive for Windows users.
Setting the Windows key to activate the panel menu involves two steps. The first is assigning the Windows key to become the "Super" key, which hopefully will already be the default. Then the second step is assigning the Windows/Super key to bring up the main menu.
slide 4 of 15
Assigning the Windows Key to Show Menus
Assigning the Windows key to Super takes place right in the Keyboard Layout Options Windows. First, find "Alt/Win key behavior." It should already be set to "Default," but please select it if it is not already.
slide 5 of 15
slide 6 of 15
Next, go to System → Preferences → Keyboard Shortcuts. The function we're interested in changing is under "Desktop" and is called "Show the panel's main menu." Click "Alt + F1" on the right, and it'll change to "New Shortcut." Then press the Windows key.
slide 7 of 15
slide 8 of 15
The right side of the column should then say "Super L," and that's fine as the default is "Super" and it's the left key.
With this assignment, pressing the Windows button will cause the "Applications" menu in the panel to open. The arrow buttons will give access to the Places and System menus as well.
slide 9 of 15
"Show Desktop" in Ubuntu
Another feature that I find useful in Windows is "Show Desktop" or "Minimize All." In Ubuntu, the equivalent feature is called "Hide all normal windows and set focus to the desktop background." (It's under "Window Management" in the Keyboard Shortcuts.) I have this set to the "Menu" key, which I don't normally use even in Windows. Unlike in Windows, after minimizing all, a second press of the same key restores all.
slide 10 of 15
slide 11 of 15
Changing the Capslock Action in Ubuntu
Things are not nearly so straight-forward in Ubuntu regarding the Capslock action. There's no graphical method to disable it, and there's no guarantee that the system will remember or act upon your request even if you write the commands into your startup files like .bashrc and .profile. Ubuntu 9.04 seems to be buggy in this way, at least on my ThinkPad.
However, here's what always seems to work to disable the Capslock key for the current session. Open a terminal and enter:
xmodmap -e "remove lock = Caps_Lock"
slide 12 of 15
This translates into "xmodmap perform expression remove lock on Caps_Lock."
slide 13 of 15
There are several different alternate assignments in System → Preferences → Keyboard → Layouts → Layout Options → CapsLock key behavior. Some of them are to make things easier for folks using traditional Linux or UNIX editors, but you can view the entire list of options there.
slide 14 of 15
slide 15 of 15
Related Reading about Ubuntu Windows Equivalents
How to Install "Device Manger" in Ubuntu - Is there an Ubuntu equivalent for the Windows Device Manager application? Yes, there IS a similar application, but it's not installed by default, and the focus of the program has less to do with drivers than it does with properties, which are, in fact, types of different messages in Linux.
Using "Task Manager" in Ubuntu - Windows users soon learn that pressing Ctrl-Alt-Delete starts the Task Manager when an application bogs down the system, but is there a similar "Kill Bill" utility in Ubuntu Linux? Sure there is, and in some ways, it's better than the Windows version.