KDE 4.1: Open the menu with the windows key
Friday, November 7th, 2008Update: not quite right the first time through, now corrected.
Update 2: This may not work on all keyboards. See the comments.
Update 3: Fixed spacing. See the comments.
The KDE developers probably have strong religious reasons for preventing the windows key from popping up the KDE menu by default. Whatever. For me, using the windows key to launch a menu is too habitual to give up, so I wanted to reconfigure KDE accordingly. Lots of guides exist online to do exactly that, but it seems most are not up-to-date for Kubuntu 8.10. I found the following command line procedure to work:
cat << EOF >> $HOME/.xmodmaprc remove mod4 = Super_L keysym Super_L = F14 EOF
cat << EOF >> $HOME/.kde/Autostart/remap_keys.sh #!/bin/sh xmodmap $HOME/.xmodmaprc EOF
chmod 755 $HOME/.kde/Autostart/remap_keys.sh
$HOME/.kde/Autostart/remap_keys.sh
The first command creates a file called .xmodmaprc telling X windows to stop using the Left Superkey, aka the Windows key, as a meta key. Instead, it should be mapped to the F14 key. The second set of commands creates a script which will call the remapping in .xmodmaprc every time KDE starts up. The third command makes that script executable, and the fourth command runs the remapping for the current KDE session so it’s not necessary to restart KDE before enjoying the changes. Finally, it’s necessary to go into the KDE control panel (called “System Settings” in Kubuntu) and set the keyboard shortcut for the KDE menu. In the control panel, select “Keyboard & Mouse”, then select “Keyboard Shortcuts”, then edit the shortcuts for the “Plasma Workspace” KDE component. There you’ll find the shortcut setting for the “Application Launcher”. Set it to your windows key and you’re done. Enjoy the illicit pleasure of driving KDE with a windows key!