What I would like to have is:

  1. By default the microphone should be muted
  2. When CapsLock is Down the microphone should unmute
  3. When CapsLock is Up the microphone should mute

(Basically convert my Skype to act like a Walkie-talkie with a push-to-talk functionality)

I found the AppleScript that can change the volume input of the microphone, so the first step was easy, but I didn't find any way to even assign the CapsLock to a script. Note that my CapsLock key is turned off and I would't like to sTART experiencing something like tHIS.

If the CapsLock is very special I wouldn't mind using another key, but I want to achieve the same functionality.

Edit: Probably it is not really possible to do it without using any application, so if there is an app that can do that, it would also work for me.

  • Maybe this functionality could be added to the app/software you will use for recording. So, in which application you'll use it?
    – nuc
    Commented Apr 7, 2011 at 11:09
  • @nuc Basically I want it to use it when I'm talking on Skype.. I want to use it as a walkie-talkie.. in order to talk you should press a button..! :)
    – Lipis
    Commented Apr 7, 2011 at 13:56

2 Answers 2


First, the AppleScript that inspects the key state and handles the mic enabling and muting:

if (modKeyDowntest()) then
  tell application "System Events" to set volume input volume 100
  repeat while modKeyDowntest()
  end repeat
  tell application "System Events" to set volume input volume 0
end if

on modKeyDowntest()
  set modKeyDown to do shell script "~/opt/checkModifierKeys shift"
  set modKeyDown to modKeyDown as integer
  set modKeyDown to modKeyDown as boolean
end modKeyDowntest

Note, that

  • the script depends on the checkModifierKeys command line app (and it's path).
  • inspects the state of shift instead of caps lock (other possibilities are cmd, option, control and caps lock - caps lock, however, means the status of caps lock, not the key state!)

In the second step we bind the script to a key shortcut. There are many applications that can do this (some listed in an answer in SuperUser) or as an Automator service. (C&P from Lri's answer...)

One more option is to save the script as an Automator service:

  • Open Automator and choose the Service template.
  • Utilities — Run Shell Script / Run AppleScript.
  • Service receives [no input] in [any application].
  • Add the script to the text area and save.
  • Assign a shortcut in System Preferences — Keyboard — Keyboard Shortcuts — Services.

So, I assigned opt+shift+M to the script above and it enables the mic, keeping it unmuted as long as I hold shift. The mic is muted again when I release shift.

  • There might be some CLI app to inspect the key state of caps lock, so checkModifierKeys could very well be replaced to make the script act on caps lock.
    – Jawa
    Commented Apr 7, 2011 at 11:31
  • 1
    And for this question the mute status is the opposite as needed, so invert the volumes to get the right functionality.
    – Jawa
    Commented Apr 7, 2011 at 11:32
  • Thanks for that.. I don't have time now to test all these things.. but basically what I want is to use Skype as a Walkie-talkie... hold a key to talk..! So I would prefer one key like F5 or something if the CapsLock is out of the question :)
    – Lipis
    Commented Apr 7, 2011 at 13:59
  • Can you please update the answer to match the question as needed.. and I think that's the answer..
    – Lipis
    Commented Apr 11, 2011 at 12:07
  • On Mojave, Services are named Quick Actions. And there is no need for tell application "System Events" to, this will force an alert requesting more rights for the current application... (see an example of muting the mic here)
    – Ulysse BN
    Commented Apr 13, 2020 at 7:44

I have not used it, but Skii plugin for Skype, seems to provide what you're looking for:

Skii is a very easy to use and simple plug-in that uses the Skype API to simplify the Push-to-Talk function. The app gives the user the possibility to control the Skype Push-To-Talk function with just one button! a small utility that will definetly improve your Skype user experience but also your overall workflow.

  • even though the other is more wide and thats is what I asked.. i think I have to go with the other one :) thanks for the Skii..
    – Lipis
    Commented Apr 11, 2011 at 12:05
  • 1
    @lipis I would pick the other one as well :)
    – nuc
    Commented Apr 11, 2011 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .