SliTaz SliTaz Forum

You are not logged in.

#1 2012-09-16 18:25:30

Alexbn
Member
Registered: 2012-03-08
Posts: 37

Keyboard shortcuts - how create them?

(Slitaz 4.0) My hand has grown tired of double-clicking, and I generally use keyboard shortcuts for everything I can, and if I can't I'll go for single-clicks (like right-click -> up/down arrows -> Enter). Double-clicking is a last resort for me, if nothing else works.

Is there any way I can create keyboard shortcuts for e.g.

- opening the ("Start") Menu

- opening the My Documents folder on the desktop (or, when right-clicking it, which option to choose? "Open with "Open Document"" option doesn't work, nor "Open with...PCMan File Manager")

- Shut down (I use either Windows-key+"D", then right-click -> Logout -> Shutdown system (halt), OR Ctrl+Alt+Backspace -> Ctrl+Alt+Delete -> Press computer power button).

Alex

Offline

#2 2012-09-16 18:34:42

Alexbn
Member
Registered: 2012-03-08
Posts: 37

Re: Keyboard shortcuts - how create them?

I just noticed this topic-string, by the way, with a similar theme:

"Creating desktop folder shortcuts"

forum.slitaz.org/topic/creating-desktop-folder-shortcuts#post-3656

But I'm open to understand more.

Offline

#3 2012-09-17 07:04:01

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Keyboard shortcuts - how create them?

Hi

Sorry for my bad english, the method to create keyboard shortcut consist on manual edit the rc.xml file on your home ex /home/tux/.config/openbox/rc.xml

open to leafpad and add or modify line keybind.

Find on web “lxde openbox keyboard shortcut”, for more information,

this an example https://bbs.archlinux.org/viewtopic.php?pid=992240

Offline

#4 2012-09-17 20:20:43

Alexbn
Member
Registered: 2012-03-08
Posts: 37

Re: Keyboard shortcuts - how create them?

I realize this takes may take some know-how. There are certainly instructions on the net, like the LXDE Wiki:

wiki.lxde.org/en/LXDE:Questions#How_do_I_make_my_keyboard_volume_buttons_work.3F

but if it had been truly straightforward, I think it would be more universally applied (it is not) than it is.

No troubles!

Offline

#5 2012-09-18 05:50:20

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Keyboard shortcuts - how create them?

Maybe it's easier if he did it once, I try to give a practical example.

Add the "grab screenshot" with F8

the base is

[c]<keybind key="F8">
<action name="Execute">
<command>mtpaint -s</command>
</action>
</keybind>[/c]
always in all 5 lines to add functions, where only the first and the third change to the selected key and the application launches.

Open with leafpad /home/tux/.config/openbox/rc.xml

look for the keyboard area bounded by lines <keyboard>

insert rows above between two

[c]</keybind>
<keybind key="xxx....">[/c]
or on final position

[c]</keybind>
<keyboard>[/c]
in my case the final position line 278 result

Cut ....

[c]</keybind>
<keybind key="F8">
<action name="Execute">
<command>mtpaint -s</command>
</action>
</keybind>
</keyboard>[/c]
save and to have the effect xsession logout and login

time by pressing F8 launches "grab screenshot"

good luck

Offline

#6 2012-09-18 19:48:55

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Keyboard shortcuts - how create them?

For buttons not identified, such as multimedia and others on your PC, to try as follows steps.

Install xorg-xev xorg-xmodmap, open a terminal and type

xev | egrep -o "keycode.*\)"

press interested and note the corresponding code that appears in the terminal eg

keycode 176 (keysym 0x0, NoSymbol) create a text file as association table to each keycode code F between F13> F29

one my example

keycode 176 = F26

keycode 174 = F24

keycode 160 = F25

keycode 222 = F29

keycode 178 = F28

keycode 236 = F27

saved as..xmodmap in your home eg. / Home / tux / .xmodmap

care to remember after the corresponding key on the PC which you assigned F value

edit the file with leafpad / home / tux / .config / openbox / rc.xml

using as a prefix for keys Fxx

my example file

cut.....

    </keybind>

    <keybind key="F8">

      <action name="Execute">

        <command>mtpaint -s</command>

      </action>

    </keybind>

    <keybind key="F25">

      <action name="Execute">

        <command>amixer set Master toggle</command>

      </action>

    </keybind>

    <keybind key="F26">

      <action name="Execute">

        <command>amixer -c 0 set Master 5+ unmute</command>

      </action>

    </keybind>

    <keybind key="F24">

      <action name="Execute">

        <command>amixer -c 0 set Master 5- unmute</command>

      </action>

    </keybind>

    <keybind key="F29">

      <action name="Execute">

        <command>poweroff</command>

      </action>

    </keybind>

    <keybind key="F28">

      <action name="Execute">

        <command>firefox</command>

      </action>

    </keybind>

    <keybind key="F27">

      <action name="Execute">

        <command>thunderbird</command>

      </action>

    </keybind>

  </keyboard>

…..cut

were added to hot-key

grab-screenshot  F8

mute F25

vol-up F26

vol-down F24

poweroff F29

firefox F29

thunderbird F27

important to create new application startup / home / tux / .config / openbox / autostart.sh

add this line

# Xmodmap

xmodmap / home / tux / .xmodmap &

xsession logout and login to apply

end of modding bye.

Offline

#7 2012-09-22 10:06:49

Alexbn
Member
Registered: 2012-03-08
Posts: 37

Re: Keyboard shortcuts - how create them?

"

Open with leafpad /home/tux/.config/openbox/rc.xml

look for the keyboard area bounded by lines <keyboard>`"

When I open Leafpad, it's empty.

(By the way, how can I highlight/quote a previous post when posting here?)

Offline

#8 2012-09-22 12:24:10

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Keyboard shortcuts - how create them?

The guide is based on an ordinary installation and user in the home in my case it tux.

If you have a different user searches for the same file in your home directory, in any case can not be empty.

I believe that the function mentioned in the forum does not exist... or at least I think

Offline

#9 2012-09-22 13:26:18

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Keyboard shortcuts - how create them?

Alex:

I like the (openbox) environment created by Crunchbang - you may want to give it a try (eg with a live cd)

and then copy the openbox menu files and adjust them to your needs.

(and there are also graphical menu editors)

Offline

#10 2012-09-22 14:53:10

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Keyboard shortcuts - how create them?

Hi Alexbn,

(By the way, how can I highlight/quote a previous post when posting here?)

Only copy-paste, sorry. Optionally you can use markup (as me above):

[c]<blockquote>
your text
</blockquote>[/c]

Offline

#11 2014-07-20 19:25:32

Pazzo
Member
Registered: 2014-07-19
Posts: 2

Re: Keyboard shortcuts - how create them?

Just used the easy way with Obkey: http://u.to/RgxjCA

Download, extract, start it with

subox python obkey /etc/xdg/openbox/rc.xml

Happy Keybinding!

Another thing: If you want to use the suspend/hibernate keys without having to enter the RootPW every time

Edit or create the /etc/sudoers file with the following line

YourUserName ALL = NOPASSWD: /usr/sbin/pm-suspend

YourUserName ALL = NOPASSWD: /usr/sbin/pm-hibernate

In ObKey use

sudo pm-suspend

sudo pm-hibernate

Slicka! SweeTa! Slitaz!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]