how to change keyboard shortcuts?

Please post all general support questions for LXDE here.
geoff
Posts: 2
Joined: Wed Sep 19, 2012 9:10 am

Re: how to change keyboard shortcuts?

Post by geoff »

Thanks for replying.

Ya, that was my guess too. Only in GNOME 3, so far as I know, can you use the Windows key by itself to trigger an action. Everywhere else (KDE, Xfce, etc.), the Windows key must be combined with another key.

The posts above suggest that it is possible to use the Win key by itself, that's why I posted a query, hoping there was a solution.
Benfll
Posts: 2
Joined: Sun Feb 16, 2014 9:15 am

Re: how to change keyboard shortcuts?

Post by Benfll »

geoff wrote:How does one set the Windows key to open the menu? I tried putting in:

<keybind key="W">

<keybind key="W-">

It doesn't work. How do you do it?
I think it is either Super_L or Super-L and you use W- if you are making a combination.
Also, if you have two keys then you will need to set Super_R or Super-R as well. I will check my laptop where I have this set up and tell you which one it is. ;)
Benfll
Posts: 2
Joined: Sun Feb 16, 2014 9:15 am

Re: how to change keyboard shortcuts?

Post by Benfll »

geoff wrote:Thanks for replying.

Ya, that was my guess too. Only in GNOME 3, so far as I know, can you use the Windows key by itself to trigger an action. Everywhere else (KDE, Xfce, etc.), the Windows key must be combined with another key.

The posts above suggest that it is possible to use the Win key by itself, that's why I posted a query, hoping there was a solution.
You can do it in LXDE, I have it set up on my laptop running lubuntu and was looking to set it up on my raspberry pi, I'll check how I did it and tell you. :)
shantiq
Posts: 1
Joined: Mon Jul 28, 2014 7:10 pm
Location: Norfolk UK
Contact:

Examples of New Keys being set

Post by shantiq »




To enter and make changes


run

Code: Select all

sudo gedit ~/.config/openbox/lxde-rc.xml
and when completed To refresh and make new changes active run

Code: Select all

openbox --reconfigure
write the following between the <keyboard></keyboard> tags
find with CTRL+f <keyboard>

example 1:

Code: Select all

<keybind key="W-m">
      <action name="Execute">
           <command>lxpanelctl menu</command>
      </action>
    </keybind>
also another example 2: to open VLC in minimal size:

Code: Select all

<keybind key="W-v">
     <action name="Execute">
     <command>vlc --no-qt-minimal-view</command>
     </action>
   </keybind>


Modifiers http://openbox.org/wiki/Help:Bindings#Modifiers


S Shift key
C Control key
A Alt key
W Super key (Usually bound to the Windows key on keyboards which have one)

Of course they can be combined ex: A-W-c or even C-W-A-p


To refresh and make new changes active run

Code: Select all

openbox --reconfigure
[/color]
ↂ ✪ ✭ ✟ ¡ Let Us Be HaPPy ! ☮ ☯ ☥ ☪ ●
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: how to change keyboard shortcuts?

Post by seppalta »

Normally the menu tag (<menu></menu>) is used for launching a menu with a keybinding. I apologize for erroneously advising a command (lxpanelctl menu) between menu tags above, which, of course, does nothing. In general, the correct entry to put between the menu tags is the menu id in the .xml file for the desired menu, provided that menu has an .xml file in your system. Unfortunately, LXDE menu does not normally include an .xml copy, but does have a .menu file (/etc/xdg/menus/lxde-applications.menu). Any .menu file can be loaded into the Openbox Menu (root-menu) and from there launched with a keybind. You are required to install a small tool, openbox-menu, to accomplish this end. Put the following into ~/.config/openbox/menu.xml, wherever you want the lxde-menu to appear:

Code: Select all

<menu execute="/usr/bin/openbox-menu lxde-applications.menu" id="desktop-app-menu-lxde" label="LxdeApplications" icon="/usr/share/icons/applications.png" />
, where you can use any icon or label that you like and where id="desktop-app-menu-lxde" can be changed to id="desktop-app-menu-*" for any "*-applications.menu " present in your computer (for example, xfce4-applications.menu).
Then put the following into the applications section of ~/.config/openbox/rc.xml:

Code: Select all

<keybind key="C-A-l">
      <action name="ShowMenu">
        <menu>desktop-app-menu-lxde</menu>
      </action>
    </keybind>
,
or use your favorite unused key combination in place of control+alternate+l.
For more details, see http://lxlinux.com/openbox.html#8.
The disadvantage of using the command "lxpanelctl menu" to launch the lxde menu is that it requires lxpanel be installed, open and have the menu icon on it. And it only launches the menu above that icon. Replace lxpanel and you lose any keybinding based upon lxpanelctl.
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: how to change keyboard shortcuts?

Post by seppalta »

There is a way to use an exec without using lxpanelctl to launch a menu. If you have pcmanfm installed, then you can usually launch the pcmanfm app menu with the command:

Code: Select all

pcmanfm menu://applications/
. So

Code: Select all

<keybind key="C-A-l">
      <action name="Execute">
         <startupnotify>
          <enabled>true</enabled>
          <name>app menu</name>
         </startupnotify>
         <command>
             pcmanfm menu://applications
         </command>
      </action>
    </keybind>
will launch the following menu:
Image.
However, there is a problem with pcmanfm 1.2.0, since this feature was removed in that edition. So just upgrade to pcmanfm 1.2.1 where it is back in. If the Lubuntu repository is too archaic to have 1.2.1, then get a .deb from the Debian Sid repository: https://packages.debian.org/sid/pcmanfm.
Rex Bouwense
Posts: 1093
Joined: Sat Aug 27, 2011 5:44 pm
Location: Sierra Vista, Arizona USA
Contact:

Re: how to change keyboard shortcuts?

Post by Rex Bouwense »

However, there is a problem with pcmanfm 1.2.0, since this feature was removed in that edition.
seppalta: They must have put it back with an update because I have Lubuntu 14.04 which has pcmanfm 1.2.0 and that feature is definitely there.
Rex
Locked