Browse the docs

System volume

Sets, raises, lowers or mutes the Mac's output volume.

op the volume

Keyboard Maestro: SystemAction, SetSystemVolume

Details #

Changes the Mac's main output volume, from 0 to 100. op chooses what to do:

  • set sets the volume to value. Needs value; it is held between 0 and 100.

  • up and down change the volume by value points (amount is another spelling). The default is 6.25, which is one notch of the keyboard volume keys. The result is held between 0 and 100. up also unmutes the Mac if it was muted.

  • mute and unmute set the mute switch.

  • toggleMute flips it.

The output is the new volume (a number) for set, up and down, and true or false (muted) for the mute operations. The Trace note reads volume 40, muted or unmuted.

Parameters #

ParameterTypeRequiredValuesWhat it does
opone ofYesset up down mute unmute toggleMuteRequired. set, up, down, mute, unmute or toggleMute. Anything else fails. action is another spelling of op.
actiontext
amountany valueAnother spelling of value for up and down.
valueany valueFor set, the level from 0 to 100. For up and down, the number of points.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Turn the volume down one notch (really changes the volume)
Do
  1. Turn the volume down
  2. Show “Quieter”
Open in Switchboard to try it

Run it in a dry run first to see the steps without touching the volume.

Gotchas #

  • Fails with volume set needs a value from 0 to 100 when set has no value.

  • The volume is the system output volume. The volume inside Music or Spotify is separate; use Music and player control.

  • In a dry run the step is simulated and the volume does not change.

See also #

Switch audio device, Music and player control