Quick Linux Tip: Remap “Back” Key to Win Key

Thinkpad keyboards are the best laptop keyboards I’ve seen. The function keys are placed in groups of four, with gaps, like on a full-size keyboard. The arrow keys are located lower than the rest of the keys, for easy tactile identification. And best of all, the Insert, Delete, Home, End, and Page Up/Down keys are grouped in the familiar 2×3 box pattern one would expect to see on a desktop keyboard.

The only thing I’m missing is a right Windows key (technically a Super key). A lot of handy Amarok shortcuts use the Win key, such as Win+O for displaying the OSD, or Win+P for firing up the playlist. I’ve also set Win+Plus and Win+Minus to change the volume. With only a left Win key, all of the above-mentioned shortcuts require two hands. So what can I do?

I can remap the “back” key (XF86Back) located above the left arrow key to act as a right Win key. (The back key itself is not that useful — in most sensible applications, one can use Backspace for that purpose.)

First, I open up xev and press the key to find its keycode: 166. Then I use xmodmap to test the changes live:

xmodmap -e “keycode 166 = Super_R”

Finally, I save the setting in my ~/.Xmodmap:

keycode 166 = Super_R

Mission accomplished.

Comments are closed.

%d bloggers like this: