Friday, May 8, 2009

Fix Thinkpad Function Keys/Hot Keys in kde 4.2 (Jaunty)

Function keys doent work by default in kde 4.2. Those who migrate from gnome to kde 4 find it difficult to adjust without the 'fn' keys. The problem is with powerdevil. The new applet does not have options to configure the acpi events. This will exits till powerdevil is fixed. As of now, we can use a python script to handle these events. Make sure python-2.6, python-dbus and python-xlib are installed in your system. Download the script from here or here.
Give exe permission
#chmod +x softkeys.py

Place the script in ~/.kde/Autostart/ and restart your system. The function keys must start working now.

4 comments:

Matthew Jakeman said...

Why restart the system? Surely an X restart would suffice for this purpose. Ctral-Alt-Backspace is your friend for tasks like this :)

varun said...

Yes that is good enough, but you must know that for jaunty ctrl + Alt + backspace is disabled by default. This can be enabled if you want. I wanted to make it clear for users who are not aware of this new change in jaunty.

Frost Icewind said...

It worked perfectly but...

the script stopped functioning after i had to restart (by pressing the power button) because my system hanged. what do i do?

Now when i try to manually execute it, it does nothing... the cursor just moves to the next line.

varun said...

@Frost Icewind: My initial guess would be that you forgot to put the script in ~/.kde/Autostart .That will make sure your script is running at startup. But trying it manually should also work. I would recommend to first put the script in Autostart with exe permissions.