You are not logged in.

#1 2010-10-18 16:28:39

zjames
Member
Registered: 2010-08-04
Posts: 29

using volume wheel

I have a volume wheel on my laptop and an trying to configure the system to use it to change the volume.  I use ratpoison as a GUI, does anyone know how to bind the volume wheel?

Offline

#2 2010-10-18 16:41:54

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: using volume wheel

1. Run xev in the terminal
2. Scroll the volume wheel up and down to determine the key
3. add

bind <volume down key> exec amixer -q set Master 1- unmute
bind <volume up key> exec amixer -q set Master 1+ unmute

to your config.

Last edited by Stebalien (2010-10-18 16:42:48)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2010-10-18 17:55:57

zjames
Member
Registered: 2010-08-04
Posts: 29

Re: using volume wheel

I ran xev then scrolled the wheel, and got this as the output:

 KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

Offline

#4 2010-10-18 18:24:40

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: using volume wheel

That usually means that the key is already bound (some other program is intercepting the key press).
On my system, volume down is XF86AudioLowerVolume and volume up is XF86AudioRaiseVolume.
Try adding:

bind XF86AudioLowerVolume exec amixer -q set Master 1- unmute
bind XF86AudioRaiseVolume exec amixer -q set Master 1+ unmute

Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#5 2010-10-18 21:01:24

zjames
Member
Registered: 2010-08-04
Posts: 29

Re: using volume wheel

Unfortunately, that doesn't seem to have worked.  And the reason the key was bound was because I had to run xev on gnome, where my volume wheel is bound

Offline

#6 2010-10-18 21:15:59

shemz
Member
Registered: 2010-04-23
Posts: 135

Re: using volume wheel

On a console, run this and press the key to get its raw code.

showkey -k

Offline

#7 2010-10-18 21:31:56

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: using volume wheel

Why can't you use xev in ratpoison?
Anyways, I messed up in my previous post, the configuration should be:

definekey top XF86AudioLowerVolume exec amixer -q set Master 1- unmute
definekey top XF86AudioRaiseVolume exec amixer -q set Master 1+ unmute

See the wiki if this still doesn't work: http://wiki.archlinux.org/index.php/Extra_Keyboard_Keys.

Last edited by Stebalien (2010-10-18 21:32:22)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#8 2010-10-18 21:51:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: using volume wheel

Stebalien wrote:

Why can't you use xev in ratpoison?

Actually, It should be -- run showkey on a console without X running.  IIRC, X intercepts and disappears raw key codes.

Last edited by ewaller (2010-10-18 21:51:48)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2010-10-18 21:56:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: using volume wheel

You did not mention the type of machine you have.  You might check to see if there is an fdi file for hal that defines your laptop.  Often there is a file that defines media keys, rfkill, alsa settings, etc.

Note that you don't need to actually run hal, the fdi could provide you with the data you need to set it up by hand.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB