Topic: Acer Media Keys / Volume Wheel on #! (other OSs aswell)
After spending more than a couple hours reading forum posts i decide to post a little guide here to help people who find themselves in my same condition.
I installed CrunchBang and as usual i played a while to check what was working and what not, after the usual video drivers installation and grub adjusting i went on to more serious issues.
As expected my media keys (I have a 5920G Aspire if you don't know what i'm talking about it's a little pad with play/stop/next/previous illuminated touch buttons) weren't working, no big surprise as they never did on any OS i previously had, the new fact was that the 'old' way to get them working which i barely reminded and which involved some kind of HAL configuration files doesn't seem to work anymore (i'm not even sure HAL is still 'really' present on latest releases - this may sound noobish i know ^^). Also, and this was new as i never had problems with it, my volume wheel (not speaking about software mixers or whatever but a physical hardware wheel on the front of my laptop) wasn't automatically configured.
Here follow the solutions i found to get them working (for now) flawlessy.
Starting with the volume wheel which is less of an issue.
Launch the command "xev" from a terminal, then move the wheel to check if it is correctly recognised. If it is (as it should be), you just need to edit the rc.xml (Openbox config) and add the following:
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<execute>amixer -c 0 set Master 5%- unmute</execute>
</action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<execute>amixer -c 0 set Master 5%+ unmute</execute>
</action>
</keybind>Restart Openbox and then it should be working. (Note that as it is, it controls the master volume)
The code is taken from http://www1.ubuntuforums.org/showthread
amp;page=2 so i owe a big thanks there.
To get the media keys working the passages needed are a couple more, nothing really difficult tho.
First type the following into a terminal:
xinput list --longThere are two entries with the name "SynPS/2 Synaptics TouchPad". The one with a resolution of 1000 units/m should be media keys' touchpasd which we are looking for.
If the 1000 units/m touchpad happens to be the first (between the 2 "SynPS/2 Synaptics TouchPad", don't mind about the other results showing up) in the list the useful script is:
xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16in the case it is listed as 2nd:
xinput set-button-map "`xinput list | grep Synaptics | tail -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16This code maps the available buttons giving us the opportunity to bind them through a program like
xbindkeys. Install it (apt-get or synaptic) then create a .xbindkeysrc file (in your home directory).
This file will contain the bindings you are willing to use for the media keys, in my case they will gonna control rhythmbox and the file will look like this:
"rhythmbox-client --play-pause"
b:17
"rhythmbox-client --pause"
b:18
"rhythmbox-client --previous"
b:19
"rhythmbox-client --next"
b:20Last thing to do is to make xbindkeys and the mapping script run automatically every startup. So modify autostart.sh (Settings->Openbox) and add
## Acer media keys
(sleep 10s && xinput set-button-map "`xinput list | grep Synaptics | head -1 | grep -o id=.. | tr -d id=`" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16) &
## Xbindkeys
(sleep 10s && xbindkeys) &Raise or reduce the wait time to match your needs.
Mapping script found on http://ubuntuforums.org/showpost.php?p= stcount=14.
Hope you will find this useful as it took some time to put it togheter.
Cheers.
Last edited by Unknown (2011-02-20 19:41:43)