Getting volume buttons to work
Typically, whenever I’ve installed Linux on a computer with hardware volume controls (e.g. my ThinkPads), those controls do not work. To get them working, you need to find the keysyms for them. You can do this by running the program xev. Once you have the keysym for them (e.g. XF86AudioMute), you need to tell some program to listen to them and run the appropriate command in response. One popular choice is xbindkeys, but you can typically get your window manager/desktop environment to do it, as well. Here is what I did with awesome (in my rc.lua):
awful.key({},"XF86AudioMute", function () awful.util.spawn("amixer set Master toggle") end),
awful.key({},"XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master playback 5%+") end),
awful.key({},"XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master playback 5%-") end)
These lines were added to the end of my “Keybindings” table.
