Sunday, May 10, 2015

Gnome Shell - Toggle mic on/off with keyboard shortcut

First off you need to identify the name of the mic that is used to control it from amixer. To do that you execute the following command:
amixer scontrols

In my case the output is:
Simple mixer control 'Master',0
Simple mixer control 'Capture',0

So 'Capture' is the name for my mic input on my laptop.

With that information you can toggle the mic on/off with the following command:
amixer -q set Capture toggle
You need to replace "Capture" with the name that represents your mic in your own machine as obtained in previous step.

And finally you configure the shortcut in Gnome preferences -> Keyboard -> Keyboard shortcuts -> Custom shortcuts

You can do this for any global shortcut that you want.


No comments:

Post a Comment