Click to See Complete Forum and Search --> : How can I customise KDE / kmix's actions for raise/lower volume hotkeys?


psi42
03-06-2004, 12:19 AM
Hi all. :)

I have a "multimedia" keyboard with custom volume controls. Since my speakers do not have any sort of volume control, I decided to set up the keyboard controls and use them to increment and decrement the volume. (The system is running slack 9.1 with kde 3.2, using alsa sound modules for the integrated sound (snd-intel8x0) ).

I found the keycodes with xed and set up xmodmap. No sweat.
I now have:
XF86AudioRaiseVolume
XF86AudioLowerVolume
XF86AudioMute

KDE 3.2 picked these up right away. What it decided to do was have all of them use kmix to do the associated tasks, and mute the volume. That creates a nice gui display of the current volume percentage and works quite well...

Except for one speedbump. When I hit the button to raise or lower the volume, it changes the volume by about 12%, which basically changes somewhat audible music to unnecessarily loud music rather quickly. I want it to only change the volume by 1%.

I then set up khotkeys to use the XF86Audio* keys to run my specified amixer commands to do what I wanted to do. However, this did not work, as the keystrokes were still intercepted by kmix/KDE (I'm not sure exactly how this works.) If kmix is killed, it will get started again by the keypress. kmix's shortcut key definintions are set to "none," and there is nothing regarding volume in KDE's keyboard shortcuts configurator in the control center. From what I can tell, the keys should not do anything until they are caught by khotplug and the amixer commands are executed. I can not find any reference to these keys in KDE's labarinthine configuration utility. :) Where is this configured?? :confused:

I eventually worked around this by setting the keys to XF86Search and XF86HomePage and then using khotkeys to assign the proper amixer commands to these. This works, but now I have no graphical measure of volume when I press the key. As this system is going to be used by a computer novice, this is kind of important. :) Now that I have seen the graphical display, I want it...and I'd like to know what's going on. :) :D


So to summarize this terribly long post :

How can I prevent KDE/kmix from intercepting XF86Audio*, and/or change what it does when it receives these keystrokes?

How can I tell kmix to only increment the volume by factors of 1% when it receives its assigned keyboard shortcut?


Thanks :)
~psi42

psi42
03-10-2004, 10:20 PM
bump