Volume control keybings

superwow

For the sake of anyone having trouble with audio keybindings, I thought I would post mine. For some reason the defaults did not work on my system.

The problem: you just installed VSIDO and you want to listen to music, and when you start playing something, you are blown across the room by the sonicblast. Fortunately you were not wearing headphones. If your relative has been labotomized by a headphone experience, I feel ya.

Start here: ~.fluxbox/keys

On my machine, it was in /home/superwow/.fluxbox

This is the fluxbox keybinding file. Keybindings make me happy in all situations, my coworkers have often been awed by my high functioning lack of mouse use, but on this machine, my trackpad is psychotic, so keybindings are even more betterer.

Before you do anything, like opening or editing the file, make a backup of the file. You can do this in spacefm. I did not, due to my trackpad's need for heavy sedation. I do this junk in the terminal. The first time I edit a config file I append _default to the default config file's name to let me know it is a special kind of backup.


cp /home/superwow/.fluxbox/keys /home/superwow/.fluxbox/keys_default
medit /home/superwow/.fluxbox/keys


Find the section for volume settings. For simplicity, I'll just drop the section here for your inspection.


# volume settings, using common keycodes
# if these don't work, use xev to find out your real keycodes
176 :Exec amixer sset Master,0 1+
174 :Exec amixer sset Master,0 1-
160 :Exec amixer sset Master,0 toggle


The number to the left of the colons is the key number, after the colon is "Exec" for execute, and following that is a terminal command to amixer. There are lots of different ways to program this baby, and I am just reusing settings from a previous distro I had installed. See there, that thing that says xev blah blah, nice little app. Ideally it should tell you what key you just pressed. On my computer, xev's output used with amixer did nothing as far as I could tell. (FYI, strangely xev outputs the values for the enter key, even though I did not press enter. If you happen to put that in the keybinding file, your system will seem like it is borked! Nothing will run correctly because the enter key has been remapped. No worries, just fix it back and all will be ok.)

Here's the text of my file, edited with a couple of usage options to control volume. Fit for immediate consumption or season to taste.


# volume settings, using common keycodes
# if these don't work, use xev to find out your real keycodes
#123 :Exec amixer sset Master,0 1+
#122 :Exec amixer sset Master,0 1-
#122 :Exec amixer set Master 5-
XF86AudioRaiseVolume :Exec amixer -q -D pulse sset Master 10%+ unmute
Mod1 XF86AudioRaiseVolume :Exec amixer -q -D pulse sset Master 3%+ unmute
Shift XF86AudioRaiseVolume :Exec amixer -q -D pulse sset Master 1%+ unmute
XF86AudioLowerVolume :Exec amixer -q -D pulse sset Master 10%- unmute
Mod1 XF86AudioLowerVolume :Exec amixer -q -D pulse sset Master 3%- unmute
Shift XF86AudioLowerVolume :Exec amixer -q -D pulse sset Master 1%- unmute
121 :Exec amixer sset Master,0 toggle


Also, if you have advice on other ways to do this, by all means, the more the merrier!

jedi

You can install "volumeicon-alsa", reboot, then right click on the volume icon, select preferences and check the appropriate boxes...
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous