Topic: [Solved] Configuring Fn keys for volume up/down and play/pause

Hello,

I'm trying to configure my Fn keys for volume up/down, play/pause and next/previous. I found this somewhere and added it to my rc.xml:

<!-- Keybindings for audio control  -->
    <keybind key="XF86AudioRaiseVolume">
     <action name="Execute">
       <command>alsamixer set PCM,0 5%+</command>
     </action>
   </keybind>
   <keybind key="XF86AudioLowerVolume">
     <action name="Execute">
       <command>alsamixer set PCM,0 5%-</command>
     </action>
   </keybind>
   <keybind key="XF86AudioMute">
     <action name="Execute">
       <command>alsamixer set iSpeaker,0 toggle</command>
     </action>
   </keybind>

When I press one of the buttons, my volume doesn't go up or down and my CPU goes to 100%. What am I doing wrong? And what are the keybindings for play/pause and next/previous? Thanks in advance!

Last edited by Unia (2010-09-01 15:23:06)

Let's do it and don't screw it.
      Github || Deviantart

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

I can't find the set option in

man alsamixer

, so i guess that's the problem.
Here my keybindings:

  <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer sset Master,0 5+</command>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer sset Master,0 5-</command>
      </action>
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <command>amixer sset Master,0 toggle</command>
      </action>
    </keybind>

You could also check if the keynames are correct. You can check it with xev:

sudo apt-get install xev

start xev from terminal and press the Fn-key and have a look in the output.

Tuna.

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

The bindings for play/pause/previous/next will depend on what player you're using. Heres an example for Exaile:

http://crunchbanglinux.org/forums/topic … or-exaile/

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

Tunafish wrote:

You could also check if the keynames are correct. You can check it with xev:

sudo apt-get install xev

start xev from terminal and press the Fn-key and have a look in the output.

Tuna.

Xev is installed by default if you install Xorg. I already did that and the keynames are correct. I'll take a look at the link anonymous gave me.

Let's do it and don't screw it.
      Github || Deviantart

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

Play/stop and next/previous works now by following the link anonymous gave. Volume up/down however didn't.
On that page, it says

<command>amixer sset PCM,0 5%-</command>

I fixed this thanks to Tunafish, who uses this command:

<command>amixer sset Master,0 5%-</command>

Thanks both!

Let's do it and don't screw it.
      Github || Deviantart

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

Unia wrote:

Thanks both!

Hey, you're welcome, i mean... you we're a big help to me yesterday smile
http://crunchbanglinux.org/forums/post/84058/#p84058
Tuna

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

Tunafish wrote:
Unia wrote:

Thanks both!

Hey, you're welcome, i mean... you we're a big help to me yesterday smile
http://crunchbanglinux.org/forums/post/84058/#p84058
Tuna

Als Nederlanders onder mekaar moet dat kunnen toch? lol

Let's do it and don't screw it.
      Github || Deviantart

Re: [Solved] Configuring Fn keys for volume up/down and play/pause

Unia wrote:

Als Nederlanders onder mekaar moet dat kunnen toch? lol

Met amerikanen moet je zo'n grapje niet maken nee... hmm
lol

Last edited by Tunafish (2010-09-01 16:00:48)