You are not logged in.

#1 2007-12-10 08:37:07

lithium
Member
Registered: 2007-09-18
Posts: 63

Multimedia Keys

I have a Dell Latitude D610. I'm trying to get the lower volume, raise volume and mute keys to work in Arch. I put the following in .Xmodmap:

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume

In .xinitrc:

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap

# merge in defaults and keymaps

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

I used this information from the Gentoo D610 wiki (http://gentoo-wiki.com/HARDWARE_Dell_Latitude_D610). In fact, when I had Gentoo on this laptop, it worked. However, it doesn't work in Arch. Any ideas?

Offline

#2 2007-12-10 10:54:10

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: Multimedia Keys

Make sure the keycodes are correct using "xev"


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#3 2007-12-11 00:04:42

lithium
Member
Registered: 2007-09-18
Posts: 63

Re: Multimedia Keys

Yes, I checked. They are

Offline

#4 2007-12-11 00:40:18

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 618

Re: Multimedia Keys

lithium wrote:

it worked.

What worked?  What were/are you using to interpret these maps?


Cthulhu For President!

Offline

#5 2007-12-11 01:26:23

lithium
Member
Registered: 2007-09-18
Posts: 63

Re: Multimedia Keys

The multimedia keys worked. I did the exact same thing and the multimedia keys (mute, vol up, vol down) functioned as expected. Pressing the mute button would mute, etc...

Offline

#6 2007-12-11 02:07:04

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 618

Re: Multimedia Keys

lithium wrote:

The multimedia keys worked. I did the exact same thing and the multimedia keys (mute, vol up, vol down) functioned as expected. Pressing the mute button would mute, etc...

When you push a button on your keyboard, there must be some software to interpret the event and respond accordingly.  As the guide there indicates the use of lineakd, are you using that?

Most modern window managers have multimedia key support.  Are you using a window manager?  If so, which one?

How do you expect the computer to react when you press a key?  Lineak specifically asks you to tell it what commands you want to run when keys are pressed.  See arch's wiki for details.

Something along the lines of

amixer sset Master 5-

to lower volume, etc., is generally appropriate.


Cthulhu For President!

Offline

#7 2007-12-11 04:12:43

lithium
Member
Registered: 2007-09-18
Posts: 63

Re: Multimedia Keys

Of course. I can't believe I forgot that!

Using openbox. Added to rc.xml:

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

Thanks.

Offline

#8 2007-12-23 14:36:33

harry
Member
Registered: 2007-06-25
Posts: 24

Re: Multimedia Keys

hi guys

i´m using openbox too and would like to use this "feature".
my ~/,Xmodmap looks like that:

keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume

i´ve added your code for the ~/.config/openbox/rc.xml at the end in the keyboard section but it doesnt work...:(
of course i run xmodmap ~/.Xmodmap first but nothing happend...

regards

Last edited by harry (2007-12-23 14:37:18)

Offline

#9 2007-12-30 12:21:53

harry
Member
Registered: 2007-06-25
Posts: 24

Re: Multimedia Keys

*push* roll

Offline

#10 2007-12-30 12:32:00

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Multimedia Keys

harry, the keycodes he has listed are specific to his laptop.  to get the correct keycodes for your keyboard, open a terminal and run the program xev.  while this is running press one of the multimedia keys and xev will spit out alot of output, including the keycodes.  put the correct keycodes into the spots in his .Xmodmap file and you should be good to go.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#11 2008-01-13 17:20:00

harry
Member
Registered: 2007-06-25
Posts: 24

Re: Multimedia Keys

hey

sorry for first pushing and then not answering hmm
in fact i have the same keycode´s as lithium although i´ve got a completely different notebook (samsung)

well i´ve already solved the problem for myself, i copied lithium´s code in the wrong section in the rc.xml tongue

now it would be nice to have a feedback when pressing the mute button or rise the volume.
have seen such a osd recently on a ubuntu box with compiz, where a conventionalized speaker fades in when you press a multimedia key, looks good
is it possible to have that osd(or a similar one) with openbox?

thx in advance

Offline

Board footer

Powered by FluxBB