Aug 3, 2011

Control Volume Via Keyboard

If have old keyboard that don't have media buttons you may want to create keyboard shortcuts witch will help you control volume on your system.

example of old keyboard without media buttons
You can do this in two ways.



Easy way:

Go to System Settings > Keyboard > Shortcuts

Click on Sound and Media and assign shortcuts for Volume up, down and mute.
You can also assign shortcuts for media player playback.


2nd way:

This is also easy but in this way you can customize  % of volume that is increased/decreased and you can do this changes to any sound channel on your system (master volume, microphone etc.)

This is easily done with amixer command.

First you need to compose command witch will change volume.

amixer --quiet set [channel]  [%][+/-/toggle]

[channel] - is channel name on witch you are making volume changes

You can get you channels information by typing these commands in terminal:
amixer
alsamixer


[%] - is number of percent how much is volume changed

[+/-/toggle] 
+ is for volume up
- is for volume down
toggle is mute or on/off (when you are using toggle you don't use [%])

Now if you want to change volume on channel "Master Front" command will look like this:

Volume up (1%)
amixer --quiet set 'Master Front' 1+
Volume down (1%)
amixer --quiet set 'Master Front' 1-
Mute/Unmute
amixer --quiet set 'Master Front' toggle

Now go to  System Settings > Keyboard > Shortcuts


Click on Custom Shortcut > + button > and paste your command for every action (volume up, down, mute) and assign keyboard shortucts

1 comments:

Anonymous said...

Wow, this post is good, my younger sister is analyzing these kinds of things, so I am
going to convey her.

Here is my website: Time Warner Cable promotion

Post a Comment