SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-09-16 12:59:23

m_ad
Member
Registered: 2009-08-22
Posts: 10

[SOLVED] Laptop volume control buttons

Hello. I am trying to get my Lenovo S12 netbook volume control buttons to work in #! 9.04. Here is what I've done..

[ matt: ~ ]$ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
123 XF86AudioRaiseVolume
122 XF86AudioLowerVolume

This means the keycode is 123 for volume up, and 122 for volume down..? So, then I do..

 vim ~/.Xmodmap 

and add the following lines

keycode 123 = XF86AudioRaiseVolume
keycode 122 = XF86AudioLowerVolume

To verify this,

[ matt: ~ ]$ xmodmap -pke | grep Volume
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume

Should there be more in this file?

Last edited by m_ad (2009-09-16 14:55:31)

Offline

Help fund CrunchBang, donate to the project!

#2 2009-09-16 13:37:49

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: [SOLVED] Laptop volume control buttons

add this to you openbox/rc.xml

    <!-- volume control -->
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
    <command>amixer sset Master,0 5%+</command>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
    <command>amixer sset Master,0 5%-</command>
      </action>
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute">
    <command>amixer sset Master,0 toggle</command>
      </action>
    </keybind>

im surprised you had to do that mine were already bound to those keys, (mute is bound to code 121)


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#3 2009-09-16 14:55:11

m_ad
Member
Registered: 2009-08-22
Posts: 10

Re: [SOLVED] Laptop volume control buttons

thanks, that worked smile

Offline

#4 2011-05-29 11:46:55

cwgtex
New Member
Registered: 2011-05-20
Posts: 6

Re: [SOLVED] Laptop volume control buttons

Thanks benj1, I need to add this as well for my Lenovo SL300.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo