Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] KDE multimedia keys
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
cubancigar11
Guru
Guru


Joined: 10 Jan 2005
Posts: 322

PostPosted: Tue Aug 05, 2008 2:10 pm    Post subject: [SOLVED] KDE multimedia keys Reply with quote

Hi!

I am coming from Slackware. There, I used xmodmap to set my multimedia keys to be recognized as XF86AudioRaiseVolume etc., and then when I would press those keys, a nice gui will show up showing the level of volume - kind of how it is in Windows or Ubuntu.

On Gentoo, I again used xmodmap to have my multimedia keys recognized, but when I would press those keys, nothing would happen.

So, I googled a little, and ultimately did this: open kmix, right-click on the master volume sidebar, select Configure Global Shortcuts, and then set "increase volume", "decrease volume" and "mute" to these keys.

Now, when I press these keys, I am able to change the volume.

BUT!

There is no fancy gui. Did I miss something? Is there a package for it? (I haven't installed kmultimedia-meta, just kmix and amarok and the dependencies). Or was it some patchwork from Slackware? I heard they didn't use to do that. Also, on Slackware, pressing these keys would change volume by ~12%, while now it changes by 1% I suppose.
_________________
eye-candy is the key to enlightenment


Last edited by cubancigar11 on Tue Aug 05, 2008 11:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
IvanMajhen
Guru
Guru


Joined: 10 Jun 2006
Posts: 369
Location: Croatia

PostPosted: Tue Aug 05, 2008 2:37 pm    Post subject: Reply with quote

If your keys are properly mapped kmilo should show gui.
Back to top
View user's profile Send private message
aronparsons
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 113
Location: Virginia

PostPosted: Tue Aug 05, 2008 5:36 pm    Post subject: Reply with quote

Depending on how you emerge KDE (kdebase-meta?), kmilo won't be pulled in automatically. Emerge kmilo and restart your KDE sesssion and you should be set.
Back to top
View user's profile Send private message
Xerionn
n00b
n00b


Joined: 15 Apr 2007
Posts: 61

PostPosted: Tue Aug 05, 2008 7:49 pm    Post subject: Reply with quote

I came from Slackware also and i used to xmodmap the keys and i am doing it over here without any problem :P
Plus i get the fancy gui as you said !

Are you sure everything is set up correctly ?
Back to top
View user's profile Send private message
cubancigar11
Guru
Guru


Joined: 10 Jan 2005
Posts: 322

PostPosted: Tue Aug 05, 2008 11:42 pm    Post subject: Reply with quote

Yep! I don't have kmilo. I am emerging it right now.

I didn't pull any meta packages...

EDIT: Yep! that was it!
_________________
eye-candy is the key to enlightenment
Back to top
View user's profile Send private message
Kidov
n00b
n00b


Joined: 20 Jul 2006
Posts: 38
Location: Finland

PostPosted: Thu Aug 07, 2008 2:56 am    Post subject: Reply with quote

I also have the same problem - no gui's when using multimediakeys.
I did emerge kmilo after reading this topic but it didn't help. Any other advice?
Back to top
View user's profile Send private message
cubancigar11
Guru
Guru


Joined: 10 Jan 2005
Posts: 322

PostPosted: Thu Aug 07, 2008 10:47 pm    Post subject: Reply with quote

You also need to assign names to the multimedia keys so that X system starts to understand what does it mean when bla key is pressed.

This is done using xev and xmodmap.

Main article is at http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys but I will trim it down for KDE.

emerge -av x11-apps/xev

Then run xev
Place mouse inside the black box xev opens, press the multimedia keys, then note the keycode for each key you pressed.

Then create a file named .Xmodmap (or .xmodmap, I prefer the later because it is more common) with this content:
Code:
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 160 = XF86AudioMute
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume

Of course, you will have to change the numbers by your own keycodes.

To check if it works, use command
Code:
xmodmap $HOME/.xmodmap

and go to any keyboard shortcut creating applet (they are common it all KDE apps... you know what I mean?) and try to assign some action to these keys. You should see XF86AudioRaiseVolume etc. If you do, everything is fine. kmilo should work now.

NOW! The great thing about KDE is that it doesn't like to use .xmodmap by default 8O

So, create a file .xprofile in your home directory with this content
Code:
xmodmap $HOME/.xmodmap

and it will work automatically always.
_________________
eye-candy is the key to enlightenment
Back to top
View user's profile Send private message
Kidov
n00b
n00b


Joined: 20 Jul 2006
Posts: 38
Location: Finland

PostPosted: Fri Aug 08, 2008 5:46 am    Post subject: Reply with quote

My keycodes were the same as yours so I used the same content as you have - but xmodmap didn't made any difference. (I use xmodmap as well to remap my mouse buttons so I know it works.)

My keyboard is Logitech Cordless Desktop Pro and (in kde control center - keyboard layout section) I have selected keyboard model to correspond this. Maybe this makes xmodmapping unnecessary?
(I also tried to unselect keyboard model if it would make any difference to xmodmap, but it didn't)

In Global Shortcuts I see XF86AudioRaiseVolume etc reading in shortcuts. (and all shortcuts works well - only kmilo gui is missing.)

(couple of years ago, when I used monolithic packages for KDE, everything worked out of the box without xmodmapping. In that time I had keyboard model specified at Kcontrol Center the same as now.)
Back to top
View user's profile Send private message
Kidov
n00b
n00b


Joined: 20 Jul 2006
Posts: 38
Location: Finland

PostPosted: Sun Aug 10, 2008 12:28 pm    Post subject: Reply with quote

Ok, I found the reason why I didn't got gui. It seems - at least in my case - soundcard has to be build in as a module.
Back to top
View user's profile Send private message
cubancigar11
Guru
Guru


Joined: 10 Jan 2005
Posts: 322

PostPosted: Sun Aug 10, 2008 3:47 pm    Post subject: Reply with quote

That's interesting!
_________________
eye-candy is the key to enlightenment
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum