You are hereBinding Windows Key to Gnome (foot/hat) Panel Menu

Binding Windows Key to Gnome (foot/hat) Panel Menu


By thomas - Posted on 22 May 2006

First run xev to see what the keycode is for your Windows Key On my keyboard it is 115 and is bound to Super_L. [uphill@surrey ~]# xev KeyPress event, serial 26, synthetic NO, window 0x4800001, root 0x48, subw 0x0, time 2012015429, (676,609), root:(681,632), state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 29, synthetic NO, window 0x4800001, root 0x48, subw 0x0, time 2012015538, (676,609), root:(681,632), state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES, XLookupString gives 0 bytes: If you see something like this: KeyPress event, serial 29, synthetic NO, window 0x4800001, root 0x48, subw 0x0, time 2012325397, (302,328), root:(307,351), state 0x10, keycode 115 (keysym 0x0, NoSymbol), same_screen YES, You'll need to set the symbol for your key first. [uphill@surrey ~]# xmodmap -e 'keycode 115 = Super_L' Or alternatively, edit the gnome keyboard xmodmap configuration file (what a mouthful), .gkb_default.xmm You should see a line like keycode 115 = In that file. Change it to: keycode 115 = Super_L

Next, add the keybinding with gconftool-2 [uphill@surrey ~]# gconftool-2 -s -t string /apps/metacity/global_keybindings/panel_main_menu Super_L [uphill@surrey ~]# gconftool-2 -g /apps/metacity/global_keybindings/panel_main_menu Super_L [uphill@surrey ~]# You should then be able to bring up the panel menu by pressing your Windows Key

Tags

Will this disable the use of windows key as a modifier? E.g., I use Windows+r to open the run dialog.

Thanks

The second command is just to check that the first one worked, you only type the part after the #, nad you stop at panel_main_menu, Super_L is the output...

Hope that helps,
T.

I get bad key or directory name must begin with slash after the second terminal command.

Hi,

your explanation is very clear, thank you.

However I have a question:
what if I want to bind the Super_L key to a "multi command" as Super_L+r to open a run dialog. Is this possible? I tried r in metacity but it did not take. Suggestions?

Also, is it possible to bind keys so that they trigger an event on release instead on press?

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options