
On Sun, 10 Jan 2010 14:48:07 +0800
Chengqi Song
myKeys = \c -> mkKeymap c $ -- volume key binding [ ("M-=", spawn "aumix2pipe +10") , ("M--", spawn "aumix2pipe -10") , ((0, 0x1008ff11), spawn "aumix2pipe -10") ...
does not compile.
It looks like you're using EZConfig, in which case you should be able to just use ("XF86AudioRaiseVolume", spawn "aumix2pipe -10") Have a look at the source for "multimediaKeys" in module XMonad.Util.EZConfig for the names of other multimedia keys. Those of us who don't use EZConfig can do: main = xmonad defaultConfig { ... , keys = \c -> myKeys c `M.union` keys defaultConfig c ... } myKeys XConfig{XMonad.modMask = modm} = M.fromList [ ... -- XF86AudioMute , ((0, 0x1008ff12), spawn "amixer -q set PCM toggle") -- XF86AudioRaiseVolume , ((0, 0x1008ff13), spawn "amixer -q set PCM 1+") -- XF86AudioLowerVolume , ((0, 0x1008ff11), spawn "amixer -q set PCM 1-") -- XF86Mail , ((0, 0x1008ff19), spawn "urxvtc -e abook") ] As was just suggested Ian Leroux