Mute Focused Window
Press a hotkey to mute or unmute the audio of the window that currently has focus
Author: Benevolent Anarchy
Press Ctrl+Alt+M to mute the app whose window has focus. Press it again to
unmute it. Other apps keep playing.
This changes the same per-app mute as the Windows Volume Mixer, so the mixer
shows the result and can undo it.
What gets muted
The mod mutes every audio session that belongs to the focused window's app, on
every active output device. If some of those sessions are muted and others are
not, the first press mutes them all.
Browsers and Electron apps such as Discord play sound from a helper process
instead of the process that owns the window. The mod therefore includes the
app's background child processes too. A child process with its own visible
window is treated as a separate app and left alone. For example, a media player
launched from a terminal keeps playing when you mute the terminal.
Hotkey
Change the hotkey in the mod's settings. Write any modifiers and exactly one
key, joined by +, for example Ctrl+Alt+M, Win+Shift+F9 or Pause.
- Modifiers:
Ctrl, Alt, Shift, Win.
- Keys:
A–Z, 0–9, F1–F24, Space, Tab, Enter, Esc,
Backspace, Insert, Delete, Home, End, PageUp, PageDown, Up,
Down, Left, Right, Pause, ScrollLock, PrintScreen, Numpad0–
Numpad9, VolumeMute, VolumeDown, VolumeUp, MediaPlayPause,
MediaNext, MediaPrev, MediaStop.
- Any other key: its virtual-key code in hexadecimal, such as
0x4D.
Windows gives a hotkey to only one program at a time, and other apps stop
receiving that key combination. If the hotkey does nothing, another program may
already own it. Turn on logging in the mod's Advanced tab to see why.
The default, Ctrl+Alt+M, also takes Word's Insert Comment shortcut. On keyboard
layouts with an AltGr key, Windows treats AltGr as Ctrl+Alt, so AltGr+M (µ on
German layouts) stops typing its character. Choose another hotkey if you need
either.
Using the keyboard's Mute key
Most keyboards with a dedicated Mute key, and laptops with a mute function key,
send VolumeMute.
- Set the hotkey to
VolumeMute to make the Mute key mute the focused app
instead of everything. Also turn on Mute the system when there's no app to
mute, so the key still mutes everything when you press it on the desktop,
the taskbar, a File Explorer window or an app without audio.
- Set the hotkey to
Ctrl+VolumeMute to keep the Mute key as it is and use
Ctrl+Mute for the focused app.
Keyboard software that reassigns the Mute key can stop it from sending
VolumeMute.
Limitations
- A browser is muted as a whole, not tab by tab. The Volume Mixer shows it the
same way.
- An app started from the focused app and hidden in the tray, with no visible
window, counts as part of the focused app. For example, a music player
started from a launcher and minimized to the tray is muted along with the
launcher. Windows gives no reliable way to tell such an app from the hidden
helper processes that browsers and Electron apps play their sound through.
- Windows remembers an app's mute setting. An app you muted is still muted the
next time it starts; press the hotkey or use the Volume Mixer to unmute it.
- Pressing the hotkey on the desktop, the taskbar or a File Explorer window does
nothing, unless Mute the system when there's no app to mute is on.
- That system mute doesn't show Windows' volume indicator.