Keyboard Shortcut for Application Menu - How?

Please post all general support questions for LXDE here.
amjjawad
Posts: 304
Joined: Mon Aug 29, 2011 1:51 am
Contact:

Re: Keyboard Shortcut for Application Menu - How?

Post by amjjawad »

HOOHAA, it works now :D

Code: Select all

<keyboard><chainQuitKey>C-g</chainQuitKey><!-- Keybindings for desktop switching --><keybind key="C-A-Left"><action name="DesktopLeft"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="C-A-Right"><action name="DesktopRight"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="C-A-Up"><action name="DesktopUp"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="C-A-Down"><action name="DesktopDown"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="S-A-Left"><action name="SendToDesktopLeft"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="S-A-Right"><action name="SendToDesktopRight"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="S-A-Up"><action name="SendToDesktopUp"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="S-A-Down"><action name="SendToDesktopDown"><dialog>no</dialog><wrap>no</wrap></action></keybind><keybind key="W-F1"><action name="Desktop"><desktop>1</desktop></action></keybind><keybind key="W-F2"><action name="Desktop"><desktop>2</desktop></action></keybind><keybind key="W-F3"><action name="Desktop"><desktop>3</desktop></action></keybind><keybind key="W-F4"><action name="Desktop"><desktop>4</desktop></action></keybind><keybind key="W-d"><action name="ToggleShowDesktop"/></keybind><!-- Keybindings for windows --><keybind key="A-F4"><action name="Close"/></keybind><keybind key="A-Escape"><action name="Lower"/><action name="FocusToBottom"/><action name="Unfocus"/></keybind><keybind key="A-space"><action name="ShowMenu"><menu>client-menu</menu></action></keybind><!-- Keybindings for window switching --><keybind key="A-Tab"><action name="NextWindow"/></keybind><keybind key="A-S-Tab"><action name="PreviousWindow"/></keybind><keybind key="C-A-Tab"><action name="NextWindow"><panels>yes</panels><desktop>yes</desktop></action></keybind><!-- Keybindings for running applications --><keybind key="W-e"><action name="Execute"><startupnotify><enabled>true</enabled><name>PCManFM</name></startupnotify><command>pcmanfm</command></action></keybind><!--keybindings for LXPanel --><keybind key="W-r"><action name="Execute"><command>lxpanelctl run</command></action></keybind><keybind key="A-F2"><action name="Execute"><command>lxpanelctl run</command></action></keybind><keybind key="C-Escape"><action name="Execute"><command>lxpanelctl menu</command></action></keybind><keybind key="F11"><action name="ToggleFullscreen"/></keybind><!-- Launch Task Manager with Ctrl+Alt+Del --><keybind key="A-C-Delete"><action name="Execute"><command>lxtask</command></action></keybind><!-- Fast access to Terminal --><keybind key="C-A-T"><action name="Execute"><command>lxterminal</command></action></keybind><!-- Fast access to filemanager --><keybind key="C-A-D"><action name="Execute"><startupnotify><enabled>true</enabled><name>PCManFM</name></startupnotify><command>pcmanfm</command></action></keybind><!-- Keybinding for PrintScreen Key --><keybind key="Print"><action name="Execute"><execute>scrot</execute></action></keybind><keybind key="A-Print"><action name="Execute"><execute>scrot -s</execute></action></keybind><!-- Keybinding for Volume management -->
        <keybind key="XF86AudioRaiseVolume">
          <action name="Execute">
              <command>amixer -q sset Master 3%+</command>
          </action>
        </keybind>

        <keybind key="XF86AudioLowerVolume">
          <action name="Execute">
              <command>amixer -q sset Master 3%-</command>
          </action>
        </keybind>

        <keybind key="XF86AudioMute">
          <action name="Execute">
              <command>amixer -q sset Master toggle</command>
          </action>
        </keybind>

        <keybind key="XF86WWW">
          <action name="Execute">
              <command>x-terminal-emulator</command>
          </action>
        </keybind>

        <keybind key="XF86Calculator">
          <action name="Execute">
              <command>galculator</command>
          </action>
        </keybind>

        <keybind key="XF86MyComputer">
          <action name="Execute">
              <command>pcmanfm</command>
          </action>
        </keybind>

        <keybind key="XF86Terminal">
          <action name="Execute">
              <command>x-terminal-emulator</command>
          </action>
       </keybind>

	<keybind key="A-m">
      		<action name="Execute">
        	<command>lxpanelctl menu</command>
      	</action>
    	</keybind>
       
	<!-- Keybindings for Multimedia Keys and LCD Backlight (alternative when not using gnome-power-manager or xfce4-volumed)
         <keybind key="C-F7">
          <action name="Execute">
            <execute>sleep 2;xset dpms force off</execute>
          </action>
        </keybind>
         <keybind key="C-F10">
          <action name="Execute">
            <execute>xbacklight -dec 10</execute>
          </action>
        </keybind>
         <keybind key="C-F11">
          <action name="Execute">
            <execute>xbacklight -inc 10</execute>
          </action>
        </keybind> -->
  </keyboard>
I placed it in the middle. There is a section for Desktop Shortcut.

What a nice test :D

Note: A logout is a must after saving the file.

Hope the OP and everyone else will find this topic useful and helpful :)
Feel Free to contact me: http://amjjawad.net
pibach
Posts: 9
Joined: Sat Oct 01, 2011 12:50 pm

Re: Keyboard Shortcut for Application Menu - How?

Post by pibach »

amjjawad wrote: Note: A logout is a must after saving the file.
Or simply run:

openbox --reconfigure


BTW, Ubuntu standard to open menu is Alt + F1
but I assigned it to Super Key + Down Key, so I can directly use the cursor to select within the menu:

  <keybind key="W-Down">
      <action name="Execute">
       <command>lxpanelctl menu</command>
    </action>
  </keybind>
Tegra 2 based Toshiba AC100, minimal Ubuntu + LXDE
pibach
Posts: 9
Joined: Sat Oct 01, 2011 12:50 pm

Re: Keyboard Shortcut for Application Menu - How?

Post by pibach »

The above works fine. But then I added a shortcut for the run dialog:

# Run dialog box at Alt-F2 (Ubuntu Standard)
  <keybind key="A-F2">
      <action name="Execute">
       <command>lxpanelctl run</command>
    </action>
  </keybind>

This works, but only once. After that I cannot do any keyboard shortcut.

Same when I issue the command from termial, lxpanelctl run works , but just once.

Strange.
Tegra 2 based Toshiba AC100, minimal Ubuntu + LXDE
Locked