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

January 22, 2010

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.

Slow KDE / Plasma on Intel Integrated Graphics?

June 25, 2009

Got a laptop with an Intel GMA? Is Alt+Tab slower than you would like? Does Plasma take forever to move or resize an applet? Maybe you didn’t think it could get better?

Try playing with the options in xorg.conf. This is a good starting place.

In my case lspci shows ‘Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42]’, and putting

Option  “AccelMethod”   “UXA”

in /etc/X11/xorg.conf has improved things significantly. UXA acceleration has been disabled by default in Ubuntu because it caused problems for some people, but in my case enabling it has made everything snappier, and also gotten rid of the drawing artifacts I used to see.

It also caused suspend to stop working (assert in X upon waking), but a recent fix to xserver-xorg-video-intel takes care of that. Distros might have released an update by now, but if you’re using Kubuntu and can’t wait, you can grab the packages from this ppa.

Snappy plasma, working suspend, happy user.

Update: Here is a post with another trick, using the -graphicssystem raster option of Qt programs. It makes switching tabs in Konsole faster, and it does wonders for long lines in Kate!