lxde-keyboard shortcuts

I am very happy using low resource lxde. However, I miss the keyboard shortcut options under kde. For instance, I would like to open various software (Chromium, Gimp, etc) with a simple F2, F3 etc. I am assuming I will need to load a start-up application/script to do this. Are there any recommendations?

Thanks for your help

Richard

LXDE is not a window manager on its own. It uses the keyboard shortcuts of the window manager it is associated with. It could be compiz, metacity, kwin, whichever you start - but by default, it will be openbox. I don’t know a GUI tool to define keyboard shortcuts for openbox - it doesn’t mean that there isn’t any - but it is not difficult to write keyboard shortcuts manually. They are saved in the file **~/.config/openbox/rc.xml **that you can edit with a text editor (I guess leafpad is installed with LXDE). I recommend making a backup of this file before changing it.


cd ~/.config/openbox
cp rc.xml{,.org}
leafpad rc.xml

Of course you can use any plain text editor you like.

As the name indicates, this is a xml file. You’ll find a section starting with

<keyboard>

amd ending with

</keyboard>

Inside this section, you can define entries to start applications.

Some examples:


<!-- Keybindings for running applications -->
<! -- start sylpheed, an email program, with the EMail special key (most keyboards have this key) -->
  <keybind key="XF86Mail">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>Mail</name>
      </startupnotify>
      <command>sylpheed</command>
    </action>
  </keybind>


<! -- start firefox, with the home special key (most keyboards have this key) -->
  <keybind key="XF86HomePage">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>Homepage</name>
      </startupnotify>
      <command>firefox</command>
    </action>
  </keybind>

<! -- start chromium, with the search special key (most keyboards have this key) -->
  <keybind key="XF86Search">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>Search</name>
      </startupnotify>
      <command>chromium</command>
    </action>
  </keybind>


<! -- start firefox with CTRL-ALT-F -->
  <keybind key="C-M-f">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>Firefox</name>
      </startupnotify>
      <command>firefox</command>
    </action>
  </keybind>


<! -- start chromium with CTRL-ALT-C -->
 <keybind key="C-M-c">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>chromium</name>
      </startupnotify>
      <command>chromium</command>
    </action>
  </keybind>



<! -- start LXDE terminal whith ALT-F12 -->
 <keybind key="A-F12">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>LXTerminal</name>
      </startupnotify>
      <command>lxterminal --geometry=152x60</command>
    </action>
  </keybind>



<! -- raise,lower,mute sound volume with amixer -->
  <keybind key="XF86AudioRaiseVolume">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>AudioRaiseVolume</name>
      </startupnotify>
      <command>amixer set Master 10%+ -q</command>
    </action>
  </keybind>

  <keybind key="XF86AudioLowerVolume">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>AudioLowerVolume</name>
      </startupnotify>
      <command>amixer set Master 10%- -q</command>
    </action>
  </keybind>

  <keybind key="XF86AudioMute">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>AudioMute</name>
      </startupnotify>
      <command>amixer set Master toggle -q</command>
    </action>
  </keybind>

You don’t need the comments in grey. The shortcuts will be available at next login.

Actually I guess it is ~/.config/openbox/lxde-rc.xml. If could be symlinked to ~/.config/openbox/rc.xml to use the same keyboard shortcuts under LXDE and on ‘naked’ openbox.

rkonrad wrote:
> I am very happy using low resource lxde. However, I miss the keyboard
> shortcut options under kde. For instance, I would like to open various
> software (Chromium, Gimp, etc) with a simple F2, F3 etc. I am assuming
> I will need to load a start-up application/script to do this. Are there
> any recommendations?

http://stray-notes.blogspot.com/2011/01/lxde-remap-keyboard-shortcuts.html

On 08/22/2011 10:26 PM, rkonrad wrote:
>
> I am very happy using low resource lxde. However, I miss the keyboard
> shortcut options under kde. For instance, I would like to open various
> software (Chromium, Gimp, etc) with a simple F2, F3 etc. I am assuming
> I will need to load a start-up application/script to do this. Are there
> any recommendations?
>
> Thanks for your help
>
> Richard
>
>

Have a look at here.
http://wiki.lxde.org/en/LXDE:Questions#How_do_I_make_my_keyboard_volume_buttons_work.3F


Euer Komputerfriek Joerg
using LXDE on 11.4 x64 and happy with a cup of real hot coffee…
http://mzl.la/o4n9Yw

Thanks everyone! That was so helpful. I’ve used many linux distributions and in comparison, the support here is second to none!

Richard

Well…just one more query. All seems to work but I can’t get the control key to work. In keybindings, is ctrl the correct term? ctrl-F2 as an example doesn’t work whereas alt-F2 does. Also, what would be the correct term for the space bar. "space’ and “spacebar” don’t seem to work.

Cheers

Richard

C-F12 = Ctrl-F12
A-F12 = Alt-F12
M-F12 = Win-F12
C-A-F12 = Ctrl-Alt-F12
etc

Look at the examples I posted.