

however I had already determined that the following captures the volume button presses...I stopped acpidI then monitored /proc/acpi/event while pushing the volume buttonsCode: Select all
/etc/init.d/acpid stopnothing...no response...Code: Select all
cat /proc/acpi/event
Code: Select all
cat /dev/input/event2Code: Select all
showkey
kb mode was XLATE
press any key (program terminates 10s after last keypress)...
keycode 28 release
#Pushing decrease volume button results in
keycode 114 press
keycode 114 release
#Pushing mute volume button results in
keycode 113 press
keycode 113 release
#Pushing increase volume button results in
keycode 115 press
keycode 115 releaseCode: Select all
...
keycode 59 = F1 F13 Console_13
keycode 60 = F2 F14 Console_14
...
keycode 113 = F13
keycode 114 = F14
keycode 115 = Help
...
string F13 = "\033[25~"
string F14 = "\033[26~"
...
Code: Select all
string Help = "echo hi"Code: Select all
#create a file such as /tmp/keymap
#add the following lines to /tmp/keymap where keycode 115 is for a particular button you are pushing (in my case it's my volume increase button)
keycode 115 = VolInc
string VolInc = "echo hi"
#save then exec the following line
loadkeys /tmp/keymap
#then push the button and you'll see what I mean...
Code: Select all
keycode 113 = F13
keycode 114 = F14
keycode 115 = Help
string F13 = "echo volume mute button pushed\n"
string F14 = "echo volume decrease button pushed\n"
string Help = "echo volume increase button pushed\n"Code: Select all
loadkeys /tmp/keymap
Code: Select all
<definition>
<config model="Compaq Presario X1000">
<VolUp keycode="176"/>
<VolDown keycode="174"/>
<Mute keycode="160"/>
</config>
<contributor>
<name>Tom Corwine</name>
<email>hotkeys@corwine.org</email>
</contributor>
</definition>Code: Select all
############################################################
# Global configuration for hotkeys #
############################################################
# These are the default values.
# A line starting with # is a comment.
### Specify the default keyboard (without the .def extension) so you
### don't need to specify -t every time
Kbd=presarioX1000
# CDROM=/dev/cdrom
# Audio stuff added by Tom Corwine
VolUp=amixer set Master 2+
VolDown=amixer set Master 2-
Mute=amixer set Master toggle
# End stuff added by Tom Corwine
# PrevTrack=xmms --rew
# Play=xmms --play-pause
# Stop=xmms --stop
# Pause=xmms --pause
# NextTrack=xmms --fwd
# Rewind=
# WebBrowser=mozilla
# Email=mozilla -mail
# Calculator=xcalc
# FileManager=gmc
# MyComputer=gmc
# MyDocuments=gmc
# Favorites=gnome-moz-remote --remote=openBookmarks
# Transfer=gtp
# Record=grecord
# Shell=xterm -rv
# ScreenSaver=xscreensaver-command -activate
# NewsReader=mozilla -news
# Communities=mozilla -remote 'openURL(http://slashdot.org)'
# Search=mozilla -remote 'openURL(http://google.com)'
# Idea=mozilla -remote 'openURL(http://sourceforge.net)'
# Shopping=mozilla -remote 'openURL(http://thinkgeek.com)'
# Go=mozilla -remote 'openURL(http://linux.com)'
# Print=lpr
# Rotate=
# osd_font=-arphic-ar pl kaitim big5-bold-i-normal--0-250-0-0-c-0-*-*
### For the color, you can either use the strings in /etc/X11/rgb.txt,
### or use the RGB syntax #RRGGBB, e.g. ##A086FF
# osd_color=LawnGreen
# osd_timeout=3
### osd_position is either 'top' or 'bottom'
# osd_position=bottom
# osd_offset=25