What I would like to have is:
- By default the microphone should be muted
- When CapsLock is Down the microphone should unmute
- 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.
Best Answer
First, the AppleScript that inspects the key state and handles the mic enabling and muting:
Note, that
checkModifierKeys
command line app (and it's path).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...)
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.