How to start menu using the WIN keys? (Solved)

Booting, installing, newbie
Post Reply
Message
Author
whileloop
Posts: 16
Joined: Tue 26 Feb 2008, 19:44

How to start menu using the WIN keys? (Solved)

#1 Post by whileloop »

I want to config the WIN keys as keyboard shortcut to open up the menu of the MENU button.
Is is possible to trigger the menu by keyboard shortcut?
And what is the keycode of WIN keys and what command should be exec?

User avatar
r1tz
Posts: 162
Joined: Thu 09 Sep 2010, 05:19
Location: In #puppylinux (IRC)

#2 Post by r1tz »

What "window manager" are you using?

Or at least state what version of puppy. windows manager is more important, but if you give the version of puppy, we can deduce what WM you are using.

whileloop
Posts: 16
Joined: Tue 26 Feb 2008, 19:44

#3 Post by whileloop »

I am using Lucid Puppy is version 5.2.
Any suggestion?

User avatar
r1tz
Posts: 162
Joined: Thu 09 Sep 2010, 05:19
Location: In #puppylinux (IRC)

#4 Post by r1tz »

Ok, puppy 5.2 uses openbox be default so.

Open up /root/.config/openbox/rc.xml

Note that .config is a hidden file. Ctrl-H to see it.

Then insert this.

Code: Select all

<keyboard>
  ...
  <keybind key="Super_L">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
  ...
</keyboard>
Note that the <keyboard> and </keyboard> are already there, you need to paste it inbetween.

Make another with Super_R if you want your right window key too.

This will work, unless you have some very weird keyboard, if it doesnt work, just post back ;)

whileloop
Posts: 16
Joined: Tue 26 Feb 2008, 19:44

#5 Post by whileloop »

It works. Now, the windows key can popup the openbox's root menu, which has the same function as the fbpanel "Start" menu. Just lack icons.
Thank you r1tz!


I think if I want to show the fbpanel menu by windows key, I need xdotool, which I will try later.

User avatar
Luluc
Posts: 200
Joined: Wed 16 Mar 2011, 07:10

#6 Post by Luluc »

In case someone runs a search for this and end up reading this thread, I hereby inform that IceWM opens the root menu with the Win key. It is pre configured to do that, no extra configuration is necessary.

I have been unable to figure out how to achieve the same with JWM. I also like to use the Win key for other things, like Win+z=minimize etc. The Win key doesn't seem to work at all in JWM. But works fine in IceWM.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#7 Post by seaside »

This works for my keyboard in JWM.

Code: Select all

<Key keycode="115">root:3</Key>
Added to the file "/root/.jwm/jwmrc-personal".

Cheers,
s

User avatar
jeffjeff
Posts: 13
Joined: Sat 25 Nov 2006, 15:06
Location: Härnösand/Sweden/Europe
Contact:

Keyboard patch in openbox not working

#8 Post by jeffjeff »

I've always found it strange that Puppy hasn't tried to make the change to Linux from Windows easier by having the WIN key open the root menu. Some versions had F12, some Ctrl+Esc, some I haven't found any key combination. (With the exception of mouse right click)

I'm using Puppy 5.2 and tried patching the XML file according to the above.
  • Restarted X-server
    Rebooted computer
    Checked to make sure the changes were still in that file
but it still isn't working.
When I look in the files keyboard section I notice a bunch of things

it says in the beginning: "<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
But I WAS working in root/.config/openbox.

other shortcuts contain

S A C which I assume are Shift Alt and Ctrl
but what is W if not Windows key?

I just noticed that at the end of the code I added:

</keybind> <keybind key="C-A-Left">

could that be a problem? :?
I'm changing to

Code: Select all

  <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <!-- Keybindings for desktop switching, added Super L&R open menu Jeff-->
    <keybind key="Super_L">
      <action name="ShowMenu">
       <menu>root-menu</menu>
      </action>
    </keybind> 
    <keybind key="Super_R">
      <action name="ShowMenu">
       <menu>root-menu</menu>
      </action>
    </keybind>
    <keybind key="C-A-Left">

User avatar
jeffjeff
Posts: 13
Joined: Sat 25 Nov 2006, 15:06
Location: Härnösand/Sweden/Europe
Contact:

#9 Post by jeffjeff »

Rearranging

</keybind> <keybind key="C-A-Left">

to

</keybind>
<keybind key="C-A-Left">

didn't help :cry:

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#10 Post by 8-bit »

I noticed in your code for the final key assignment that you did not have a closing keybind line like the one above it.
I am not familiar enough to know if it is needed, but it seems that for every opening function, one should have a closing function.

User avatar
jeffjeff
Posts: 13
Joined: Sat 25 Nov 2006, 15:06
Location: Härnösand/Sweden/Europe
Contact:

only not (visibly) closed

#11 Post by jeffjeff »

that last
<keybind key="C-A-Left">
was just showing the beginning of the code after what I inserted.

Post Reply