I would like to be able to set three custom keyboard shortcuts to be able to decrease, increase and mute the volume in Ubuntu 12.04 (Unity). On my old Ubuntu 10.04 (Gnome) system I made CTRL + [, CTRL + ] and CTRL + \ my commands to achieve this.

What is the simplest way to go about this?

share|improve this question
    
askubuntu.com/q/51156/47206 – cipricus Aug 28 '12 at 11:52

@dobey's solution works if you want to have only one keyboard shortcut for increasing / decreasing the volume.

If instead you want to have multiple key bindings controlling the volume (like to keep the default volume buttons on your laptop working, while adding additional keyboard shortcuts to use when you connect an external keyboard that does not have volume controls), then:

  1. Go to System Settings → Keyboard → Shortcuts → Custom Shortcuts.
  2. Click + to add a new keyboard shortcut. Set the "Name" to Volume up, "Command" to

    amixer -D pulse sset Master 5%+ and click Apply.

  3. Click Disabled next to your new key and choose the desired binding on your keyboard.
  4. Add another shortcut with name Volume down and command

    amixer -D pulse sset Master 5%-

Steps GIF

share|improve this answer
1  
+1 Good magic - it works. It would be nice if it tied into the same volume bar that pops up with the regular volume buttons. – CivMeierFan Sep 15 '15 at 18:36
5  
mute/unmute: amixer -D pulse sset Master toggle – CivMeierFan Sep 15 '15 at 18:38
    
I used your commands but the Volume up shortcut actually lowers the volume instead though it works normally in the terminal. What's going on? – user10853 Sep 2 '16 at 22:59
    
Make sure you typed 5%+ not 5%- for volume up. – Anis Abboud Sep 3 '16 at 19:05
    
Yes I confirm I had those right @AnisAbboud – user10853 Sep 18 '16 at 14:36

Open System Settings, go to Keyboard, then the Shortcuts tab, and finally choose Sound and Media in the list on the left. You can then choose the Volume related items in the list on the right side, and select which keybinding to use.

(Reverse usage of left and right here, for RTL languages.)

share|improve this answer
    
This works, but it also disables the built-in Volume control buttons on my laptop. Anis' answer above allows those to still work. – CivMeierFan Jul 13 '17 at 19:21
    
That wasn't a requirement of the question asked, and also depends on how the volume control buttons are implemented. Also, this question is 5 years old, and Ubuntu 12.04 is End of Life now. – dobey Jul 13 '17 at 19:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.