You are not logged in.

#1 2007-10-29 03:49:23

aLiase
Member
Registered: 2007-10-24
Posts: 21

sound control on keyboard [SOLVED]

So I have a Dell keyboard with a sound control built onto it, and I'm not sure how to enable those keys so that it'll work with amarok and possibly other media players like mplayer.

thanks for the help.

Last edited by aLiase (2007-10-29 23:33:49)

Offline

#2 2007-10-29 04:16:19

FizDev
Member
From: Canada
Registered: 2007-06-29
Posts: 57

Re: sound control on keyboard [SOLVED]

Do you use a Desktop Environment (KDE, Gnome, XFCE, etc...) or simply a Window Manager (OpenBox, IceWM...)?

If you have a DE, then you can go into the settings and set a keyboard shortcut to "Volume Up", "Play/Pause", etc.

Last edited by FizDev (2007-10-29 04:16:57)

Offline

#3 2007-10-29 04:29:51

aLiase
Member
Registered: 2007-10-24
Posts: 21

Re: sound control on keyboard [SOLVED]

I'm using a DE (KDE), the thing is I tried going into the shortcut and assigning it, except it totally not recognizing that I have one. So I thought maybe theres something I have to enable in xorg config.

Any ideas?

Offline

#4 2007-10-29 05:53:38

Drako
Member
Registered: 2006-03-04
Posts: 8

Re: sound control on keyboard [SOLVED]

did you set the correct keyboard model in  kde Control Center --> Regional & Accessibility ---> Keyboard Layout

if you did you can try setting your shortcuts in the "keyboard shortcuts" section also in "Regional & Accessibility"

this is part of my xorg.conf, i have a geniuscomfy keyboard and the sound control works just fine, you can try configuring your xorg with "xorgconfig"

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbModel" "geniuscomfy2"
        Option      "XkbLayout" "es"
EndSection

hope it helps

Drako

Offline

#5 2007-10-29 07:15:01

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: sound control on keyboard [SOLVED]

It sounds like you need to map the correct key symbols for your keys to work. I've got a Dell laptop and I had to do this to get the volume keys to work in KDE. Here's how to check this and to set it up if this really is the problem.

1. Open a terminal (Konsole or other, it doesn't matter.)
2. Run the program xev. This will open up a small square window and you'll start seeing some output in the terminal.
3. Place the cursor over the small square window and press each of your multimedia keys in turn. If the are configured you should see something like the following:

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34988822, (468,380), root:(1493,381),
    state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989003, (468,380), root:(1493,381),
    state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989234, (468,380), root:(1493,381),
    state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989383, (468,380), root:(1493,381),
    state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989623, (468,380), root:(1493,381),
    state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989773, (468,380), root:(1493,381),
    state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34989982, (468,380), root:(1493,381),
    state 0x0, keycode 162 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34990179, (468,380), root:(1493,381),
    state 0x0, keycode 162 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34990376, (468,380), root:(1493,381),
    state 0x0, keycode 144 (keysym 0x1008ff16, XF86AudioPrev), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34990469, (468,380), root:(1493,381),
    state 0x0, keycode 144 (keysym 0x1008ff16, XF86AudioPrev), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34990772, (468,380), root:(1493,381),
    state 0x0, keycode 153 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34990848, (468,380), root:(1493,381),
    state 0x0, keycode 153 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34991127, (468,380), root:(1493,381),
    state 0x0, keycode 164 (keysym 0x1008ff15, XF86AudioStop), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 24, synthetic NO, window 0xc00001,
    root 0x75, subw 0x0, time 34991279, (468,380), root:(1493,381),
    state 0x0, keycode 164 (keysym 0x1008ff15, XF86AudioStop), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Note that these events may be interspersed with other X events (mouse movement, window hiding, etc.) so probably the best thing to do is run xev like xev > xev.out 2>&1 and then search xev.out for "XF86". From the above you'll note that the X key symbols for the multimedia keys are XF86AudioMute, XF86LowerVolume, XF86RaiseVolume, XF86AudioPlay, XF86AudioPrev, XF86AudioNext and XF86AudioStop. (Note that xev is useful for finding the keycodes/keysyms for most keys on your keyboard.)

4. If you see the key symbols I just mentioned then your keys are being detected and there is a problem elsewhere. In KDE these keys should be mapped to the correct actions by default, so I'm not sure where you would look.

5. If you don't see these symbol names, but instead a bunch of "No Symbol" events, you need to create a file ~/.Xmodmap with the following contents:

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 164 = XF86AudioStop

Note that the keycodes shown are for my laptop. If your keys are not mapped I would recommend running xev and then looking at the keycode parameter for each key pressed. Substitute what xev reports for the keycode for my numbers above.

6. It's been a while since I've used KDE, so I'm not sure about this step, you may or may not need it. Some distros will automatically have X read ~/.Xmodmap on startup, in which case you should be set, just log out and log back in. If not you may have to put the following script in ~/.kde/Autostart:

#!/bin/sh
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap

Once you've get these keys generating the correct key symbols and you have your .Xmodmap read in, you should be set.

Good luck and regards.

Offline

#6 2007-10-29 08:33:49

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: sound control on keyboard [SOLVED]

Or, if your keyboard is supported, you can give keytouch a try. Instructions in the wiki.


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

#7 2007-10-29 23:33:36

aLiase
Member
Registered: 2007-10-24
Posts: 21

Re: sound control on keyboard [SOLVED]

@jbromley, thanks everything worked : )

@everyone else, thanks for the helps.

Offline

Board footer

Powered by FluxBB