Results 1 to 8 of 8

Thread: lxde-keyboard shortcuts

  1. #1
    Join Date
    Jan 2009
    Location
    Winnipeg, Canada
    Posts
    47

    Default 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

  2. #2

    Default Re: lxde-keyboard shortcuts

    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.

    Code:
    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
    Code:
    <keyboard>
    amd ending with
    Code:
    </keyboard>
    Inside this section, you can define <keybind> entries to start applications.

    Some examples:

    Code:
    <!-- 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.

  3. #3

    Default Re: lxde-keyboard shortcuts

    Quote Originally Posted by please_try_again View Post
    They are saved in the file ~/.config/openbox/rc.xml .
    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.

  4. #4

    Default Re: lxde-keyboard shortcuts

    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...shortcuts.html

  5. #5
    Join Date
    Apr 2010
    Location
    i am location
    Posts
    1,445

    Default Re: lxde-keyboard shortcuts

    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:Questio...uttons_work.3F

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

  6. #6
    Join Date
    Jan 2009
    Location
    Winnipeg, Canada
    Posts
    47

    Default Re: lxde-keyboard shortcuts [SOLVED]

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

    Richard

  7. #7
    Join Date
    Jan 2009
    Location
    Winnipeg, Canada
    Posts
    47

    Default Re: lxde-keyboard shortcuts

    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

  8. #8

    Default Re: lxde-keyboard shortcuts

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •