Keyboard shortcut to mute audio in OS X El Capitan?

Solution 1:

Try toggling the F-key functionality in System Prefs > Keyboard > Keyboard

If your generic keyboard has no Mac-compliant Fn key, it may be your only solution. The hardware keys don't transmit in the same way as 'regular' keys.

enter image description here

This script works for Yosemite, but not El Capitan…

set myVolume to get volume settings
if output muted of myVolume is false then
    set volume with output muted
else
    set volume without output muted
end if

An additional possibility could be to switch to another Sound output, one that is currently silenced, like, for example, Digital Out.

From Using Apple Script to Manage Sound Output Selection

You could save this as a Service in Automator, then call it with a hot-key

(*
Applescript to toggle between two sound outputs by Line number, ¬
as they appear in the Sound Control Panel. Based on code by ¬
Arthur Hammer https://apple.stackexchange.com/a/209434/85275
*)

set outputA to 3 --change this to the actual 'line number' of your first desired output
set outputB to 4 --change this to the actual 'line number' of your second desired output
--the rest of the script will use these vales as a switch

tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.sound"
end tell


tell application "System Events"
    tell application process "System Preferences"
        repeat until exists tab group 1 of window "Sound"
        end repeat
        tell tab group 1 of window "Sound"
            click radio button "Output"
            if (selected of row outputA of table 1 of scroll area 1) then
                set selected of row outputB of table 1 of scroll area 1 to true
            else
                set selected of row outputA of table 1 of scroll area 1 to true
            end if
        end tell
    end tell
end tell
--tell application "System Preferences" to quit
--remove the comment '--' tag above to make the control panel quit afterwards, leave for testing.

Solution 2:

It's possible with Karabiner ( a keyboard customizer )

If you search for mute in karabiner, you get this:

You can also try to search for: "Volume control"

enter image description here

The take away from this is that there are many presets for mute to choose from. They are meant for different situations an for different types of keyboards.


Might not be necessary in your case, but just so you know. You can also make custom settings with the private.xml file. Here's more documentation on that.


I personally use this setting with my keyboard (Logitech G710+)

enter image description here