Binding Silencing Audio When Game Window Is In Background

Okay, so I really want to bind a key to this:

Any help would be amazing <3 Thanks in advance

try


snd_mute_losefocus

[editline]31st August 2013[/editline]


bindtoggle "insert" "snd_mute_losefocus 0 1"

is what I got, I forgot to mention, maybe a toggled thing? Like with console?

Edit: Amazing, thank you so much!

it’s not a toggle

[editline]31st August 2013[/editline]

do


bindtoggle "insert" "snd_mute_losefocus 0 1"

and press insert to toggle it

that’s what I got and it did nothing

Edit: I figured it out. bindtoggle ins “snd_mute_losefocus” No need for the toggles at the end. Thanks so much!

snip