# grep -i audio /usr/share/X11/XKeysymDBSunAudioLowerVolume :1005FF77
SunAudioMute :1005FF78
SunAudioRaiseVolume :1005FF79
XF86AudioLowerVolume :1008FF11
XF86AudioMute :1008FF12
XF86AudioRaiseVolume :1008FF13
XF86AudioPlay :1008FF14
XF86AudioStop :1008FF15
XF86AudioPrev :1008FF16
XF86AudioNext :1008FF17
XF86AudioRecord :1008FF1C
XF86AudioPause :1008FF31
XF86AudioMedia :1008FF32
XF86AudioRewind :1008FF3E
# xev and find the correct keycode corresponding to the keyboard label.
@ When Fn+mute symbol is pressed, the following message is displayed in the console
KeyPress event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808416027, (89,75), root:(139,189),
state 0x0, keycode 160 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808416027, (89,75), root:(139,189),
state 0x0, keycode 160 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
@ When Fn+volume raise symbol is pressed, the following message is displayed in the console
KeyPress event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808428141, (89,75), root:(139,189),
state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808428141, (89,75), root:(139,189),
state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
@ When Fn+volume lower symbol is pressed, the following message is displayed in the console
KeyPress event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808428638, (89,75), root:(139,189),
state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x2600001,
root 0x68, subw 0x0, time 1808428638, (89,75), root:(139,189),
state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
# emacs ~/.xmodmaprc &keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
# xmodmap ~/.xmodmaprc
# emacs ~/.fvwm/.fvwmrc &key XF86AudioMute A N Exec exec amixer -q set Master toggle
key XF86AudioRaiseVolume A N Exec exec amixer -q set Master 2+
key XF86AudioLowerVolume A N Exec exec amixer -q set Master 2-
Restart fvwm.
reference
http://www.mail-archive.com/fvwm@lists.math.uh.edu/msg15985.html