Super key to pause, mute mic, and mute speakers in windows

11

2

EDIT:Just rephrasing the question:

Does anyone know how to mute the mic using autohotkey?
Here's why I need it:

Whenever someone walks in my office I have to pause the media player. Sometimes, when I'm watching a video, I also have to mute the headphone speakers. And if I'm on a skype call I have to mute the mic.

I want to assign all those functions to a single hotkey for convienience (probably the "mute" or "play/pause" key) and I'm pretty sure autohotkey can do that, but I don't know how to mute the mic using autohotkey.

Plus, I also want to assign all reverse commands (play and unmute) to a single key (could be a different one or the same one).

(I don't think it matters, but I'm using windows 7)

Malabarba

Posted 2009-10-15T02:20:49.947

Reputation: 7 588

you can pause all media programs using monitores ( with register PAUSE key option) – ukanth – 2009-10-15T02:40:42.300

Rephrased the question for clarity. – Malabarba – 2009-10-15T03:02:35.993

Answers

6

#z::
soundget, isMute, MICROPHONE, MUTE
if isMute = Off
    toMute = 1
else
    toMute=0
SoundSet, toMute, MICROPHONE, MUTE
return

Would toggle the mic's muted state on win&z. Muting master volume would be much the same, except instead of MICROPHONE you would put MASTER, however if it's just your media player you want muting it may be better to set up a hotkey to pause it, rather than mute system volume. Depending on the player it may be able to do it itself, otherwise look into the ControlSend function.

(This has the advantage of not using NirCMD, as while it's a brilliant tool, the ~.5 second disk lag is really annoying to me :()

Phoshi

Posted 2009-10-15T02:20:49.947

Reputation: 22 001

@Malabarba how do you set WIN XP compatibility? – bryan – 2018-03-14T22:58:39.897

I'd really like to do it without NirCMD, but the command above (as is) doesn't seem to work for me. It doesn't report any errors when loading the script, but pressing the associated hotkey doesn't do anything either. I tried with both MICROPHONE and MASTER. I'll look into the help file and see if I can make it work. – Malabarba – 2009-10-15T18:30:16.803

Problem fixed: went to the Autohotkey insallation folder and set it to compatibility mode (WIN XP). Thanks! – Malabarba – 2009-10-15T18:59:39.570

Ah, awesome! That's something to remember :) – Phoshi – 2009-10-15T20:12:22.417

4

I would recommend 'MicMute' utility to mute or unmute the primary microphone using a keyboard. It has a nice taskbar icon, taskbar balloons, and auditory notifications you can modify.

What's awesomer it also let me select my keyboards extended media keys as a shortcut - I choose the button next to my system volume mute.

MicMute Keyboard Muting of Windows Microphone

Daniel Sokolowski

Posted 2009-10-15T02:20:49.947

Reputation: 651

1Unfortunately, I've had bad luck with MicMute. Something with it listening for a keyboard shortcut causes my entire system to come to a crawn when I type sometimes. Closing MicMute immediately fixes the speed issues. – Josh Mouch – 2015-10-22T17:00:43.593

3

you can do this and much more by using NirCMD along with AutoHotKey.

Take a look: http://www.nirsoft.net/utils/nircmd.html

NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...

J Sidhu

Posted 2009-10-15T02:20:49.947

Reputation: 606

Actually, it looks like it can mute any sound device with the "mutesysvolume" command. I'll test it now. – Malabarba – 2009-10-15T05:31:28.957

Worked perfectly thanks!
run nircmd.exe mutesysvolume 2 microphone
– Malabarba – 2009-10-15T05:38:35.463

2

Very simple:

  1. Go to your Skype
  2. Select Tools
  3. Select option
  4. Click advance below
  5. Then click Hotkeys
  6. Check Enable keyboard shortcuts
  7. Check mute microphone..and click it
  8. Then select an additional key you want in muting the microphone.. like CTRL + Z... CTRL + D... any key you want to choose
  9. Finally, click Save..

Fatima Caballero

Posted 2009-10-15T02:20:49.947

Reputation: 21

1

I have set ctrl+p to toggle the system sound, for window+z it would be:

#z::Send {Volume_Mute}

Abbas

Posted 2009-10-15T02:20:49.947

Reputation: 243

0

Here is a sample AutoHotKey command to use nircmd to mute a mic. You will have to play around with the number at the end, it refers to mic number.

#z:: Run c:\tools\nircmd\nircmd.exe mutesysvolume 2 microphone 2

Press Windows + Z to toggle mute.

bryan

Posted 2009-10-15T02:20:49.947

Reputation: 7 848

0

To extend Phoshi's answer, using AutoHotkey and this script can help (Ctrl+F8):

^F8::
SoundSet, +1, MICROPHONE, mute
return

In my case though, it was the following:

SoundSet, +1, MASTER, mute, 12

This might help to get exact audio device configuration: https://autohotkey.com/docs/commands/SoundSet.htm#Ex

Corio

Posted 2009-10-15T02:20:49.947

Reputation: 153