Kubuntu 11.10: Mapping the Windows Key to Activate KMenu
This post is an explanation of how to map the Windows key on a Dell Studio 17 running Kubuntu 11.10 to open the KMenu. If you, or your programs, rely on the Windows key as a Meta key for certain functionality this will break that. This is your only warning.
This is taken from the Mepis docs that can be found at http://www.mepis.org/docs/en/index.php?title=Extra_keys. I wandered around the world for a long time before I stumbled onto this wiki and it laid everything out step-by-step. I am simply listing the same steps from the Mepis Extra Keys documentation modified for Kubuntu running on my Studio 17 notebook.
- Open a Konsole window
- Find the key to which Super_L (the Windows key comes up as Super_L) is mapped by running xev (it will open a small window that waits for your keyboard input and displays it in the console window where xev was started. Closing the window will cause xev to terminate)
> xev | grep Super_L state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES, state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
The keycode above came from my keyboard. Please run xev to determine what your keycode is.
- Create a file under ~/.kde/Autostart to remap the above discovered keycode to F13. I called my file win-key.sh as per the doc at Mepis (also Mepis mentioned mapping the keycode to the string Menu, but that did not work for me).
#!/bin/bash xmodmap -e 'keycode 133 = F13'
- Make the script you created in Step 3 executable:
> chmod +x ~/.kde/Autostart/win-key.sh
- Execute the script manually (it will be executed every time you restart)
> ~/.kde/Autostart/win-key.sh
- Confirm the keycode has been mapped to F13
> xev | grep F13 state 0x0, keycode 133 (keysym 0xffca, F13), same_screen YES, state 0x40, keycode 133 (keysym 0xffca, F13), same_screen YES,
- KMenu –> Search: Global Keyboard Shortcuts –> KDE Component: Plasma Desktop Shell –> Activate Application Launcher Widget –> Custom (Click None)
- Press the Windows Key and None should change to F13
- Click OK.
The Windows key should now activate the KMenu. Remember, if you have programs using the Windows key as the Meta key then your programs will now be broken (I lied when I said I would only warn you once).
I was a man on a mission today. The cat was grateful for the air.
Share this:
Leave a Reply Cancel reply
Top Posts
- Writing an Eclipse Plug-in (Part 4): Create a Custom Project in Eclipse - New Project Wizard: the Behavior
- Writing an Eclipse Plug-in (Part 2): Creating a custom project in Eclipse - Adding to the New Project Wizard
- Writing an Eclipse Plug-in (Part 7): Creating a Custom Navigator
- Kubuntu 11.10: Mapping the Windows Key to Activate KMenu
- Writing an Eclipse Plug-in (Part 11): Common Navigator: Displaying Custom Resources or Refresh Or Die or The Magic of navigatorContent
Archives
- January 2012 (1)
- February 2011 (1)
- January 2011 (1)
- August 2010 (2)
- June 2010 (1)
- May 2010 (2)
- April 2010 (1)
- March 2010 (1)
- February 2010 (4)
- January 2010 (2)
- December 2009 (5)
- November 2009 (2)
- October 2009 (6)
- September 2009 (6)
- August 2009 (4)
- July 2009 (6)
- April 2009 (2)
- February 2009 (2)
- December 2008 (1)
- October 2008 (2)
- September 2008 (2)
- August 2008 (1)
Top Rated
Blog Stats
- 262,730 hits
You have saved me possible hours of search and frustration. I thank you, and my Dell Studio 17 running Kubuntu 11.10 thanks you as well.
I live to serve…and to keep track of things I do on my Linux box that I know I will forget by the next fresh install…
GRANDISSIMO PORCODDIOOOOOOOOOOOO
(Jeez, I hope that was a compliment…)
That was one thing i missed so much from unity. Back to KDE forever. I wuv you!
Other key combinations will work (Win+D, Win+R) normally after this fix, but KMenu will open/close on each keypress. Is exist any fix for this?
Good tip, but there’s an even simpler way. I already have .Xmodmap file in my home (to remap end and delete keys on my Thinkpad). I just added keycode 133 = F13 to that file, logged in again, and it works.
istok, thanks, this way works, but it broke other win+key combinations, for example – win+R, win+D and other, so we can use only single Win keypres or Win with other keys, but not together
I have found the very good solution for this problem, it is described on page http://hanschen.org/2012/10/17/open-application-launcher-with-super-key/