PDA

View Full Version : KDE Multimedia Keys Works but how to modify?


eldaria
January 23rd, 2007, 10:26 AM
Hello,

I have a Logitech Keybaord connected to Kubuntu Edgy.

The multimedia keys are working, but I can't find anywhere how to modify what they do or how they do it.

I looked in the System Settings->Accessibility-Input Actions
But the Keys are not configured in here.
I also looked in kmix, but they are not configured there either.

The reason is that I want to modify them is that the volume key changes 10% at a time, this is way to large steps, I want to make them 1% steps.

Also in Amarok the Play/Pause button starts the music from the beginning instead of Pause when already playing.

Where can I modify this behavior?

I found the file where I think the events from the keyboard are sent to the system.
I found this in /usr/share/apps/kxkb/ubuntu.xmodmap


keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext

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


But again I can't see where to modify the actual values of Volume changem or what the action is called for Play/Pause instead of Play only.

Any hint's highly appreciated. ;-)

Brian.

lvanderree
February 2nd, 2007, 04:20 PM
Maybe this can do what you want, found it on google, so just copy-pasted it:



sudo apt-get install xbindkeys xbindkeys-config
xbindkeys --default > ~/.xbindkeysrc
xbindkeys-config


This will bring up a but-ugly configuration screen. Just click "New" and assign a remark to the new shortcut. Then press "Grab" and press the combination you want

g8m
February 3rd, 2007, 02:01 AM
Input actions is one place, but I believe there is also a keyboard-shortcuts, with 3 tabs to modify the key behavior. Also apps like amarok have separate keyboars-shortcut configuration screens. Very confusing in KDE. Also kmix (volume control) has a configuration tool for volume up and down. Although with my KDE install, volume down using the keyboard wheel doesn't work, volume up does. Weird.

michael003
March 1st, 2007, 04:57 PM
After not finding anything about this issue, I dove into the source code. The step size is not configurable, but if you press Ctrl+VolUp/VolDown it should change in steps of 1%. (Ctrl+VolUp doesn't work on my computer though, although Ctrl+VolDown does.)

The README file with the kmilo source code says
If you use CTRL in conjunction with volUp/Down it changes the volume by 10, otherwise by 1.

which contradicts the actual implementation. It makes more sense (to me at least) to do it as the README states.

eldaria
March 2nd, 2007, 02:36 AM
Interesting, the ctrl+Volume works.
But that must be implemented somewhere in code, but question is where, I wonder should we enter it as a bug?

And I agree the way you say the readme states it should work, would make more sense.
Could it be the way (k)ubuntu implemented it, that someone got it wrong? :-)
Have not tried any other distributions since Kubuntu 6.06 came out and before that it was windows. :-)
What source did you download by the way?
could be fun to see how they did it.

michael003
March 2nd, 2007, 06:07 AM
But that must be implemented somewhere in code, but question is where, I wonder should we enter it as a bug?
Here's the relevent code: http://websvn.kde.org/branches/KDE/3.5/kdeutils/kmilo/generic/generic_monitor.cpp?revision=624936&view=markup

If I have time I might hack it and submit a patch.

Could it be the way (k)ubuntu implemented it, that someone got it wrong? :-)

No -- it's directly from KDE.

eldaria
March 2nd, 2007, 08:44 AM
Here's the relevent code:
If I have time I might hack it and submit a patch.


Great, I will look forward to that.

I will also try and look at the code, will see if it makes any sense to me. ;-)
I'm new to coding in linux, I used to do some coding in Visual Basic, but hey it might be a learning experience. :-)

Actually the function of the volume key be it 1% or 10% should be configurable, since if for example you have a keyboard with one button for volume up and one for down, pushing it 100 times to go from 100 to 0 or other way around, would be a pain.

However on some keyboards including both of mine, there is "knob" so it is very fast and easy to adjust, and here a 1% step would make more sense.

JanusDC
February 16th, 2008, 05:03 PM
After not finding anything about this issue, I dove into the source code. The step size is not configurable, but if you press Ctrl+VolUp/VolDown it should change in steps of 1%. (Ctrl+VolUp doesn't work on my computer though, although Ctrl+VolDown does.)

The README file with the kmilo source code says


which contradicts the actual implementation. It makes more sense (to me at least) to do it as the README states.

It still working like you said. I have a HP Pavilion dv2745se and this works exactly as you said. Thanks for your discovery :)