Using Keyboard Shortcuts To Control Per-application Volume. (even in games)

Hi, everyone

If you are like me you really don’t like Alt-Tabbing out of a game to change or mute the volume of a specific application.

This is what this guides aims to fix.

After a bit of searches, I settled on using a utility made by Nirsoft called NirCmd.
This utility as the ability to change specific application volume level present in the sound mixer.

Than we can use an other software called AutoHotKeys to make a keyboard shortcut start a NirCmd command.

The way I have it setup is to control Discord, Firefox and VLC’s volume level individually
CTRL + Shift + Q or A lowers or augments the volume of Firefox. W & S for discord. E & D for VLC.
For a total of 6 scripts.

---------------Tutorial-----------------------
This is how you can do it.

1- download and extract NirCmd in a location that wont be deleted or changed so the scripts doesn’t break.
(download link at the bottom of the page on the nirsoft . net website)

2- download and install AutoHotKey.

3- open a text editor and make a script. (saved as a .ahk file)

3.1 NirCmd as a lot of commands and possibility, here’s a simple list. (you can go on Nirsoft for documentation)
-setappvolume
-changeappvolume
-muteappvolume

3.2 Example Of Script

#SingleInstance off
^+a::
Run cmd.exe /c start C:\Users\PC\Desktop\Tech\NirCMD\nircmd-x64\nircmd.exe changeappvolume firefox.exe -0.1 , , hide

  • #SingleInstance off
    (this is the 1th line, its part of AutoHotKey, simply avoids error messages)

  • ^+a::
    (this is the 2th line, its part of AutoHotKey, its the short cut itself)
    (^ = CTRL) (+= Shift) (a = letter A) (^+a:: = when CTRL + SHIFT + A : is pressed)

  • Run cmd.exe /c
    (this is part of AutoHotKey)

  • start C:\Users\PC\Desktop\Tech\NirCMD\nircmd-x64\nircmd.exe
    (this is the CMD part of it, start followed by the path to the NirCmd)

  • changeappvolume firefox.exe -0.1
    (this is the request to NirCmd, it will lower the volume of firefox by 10%)

  • , , hide
    (this is part of AutoHotKey, it makes it run in Background)

4- Once this is saved as a .ahk file, double-cliking it will enable it.
Once enabled, doing the short cut on your keyboard will have the desired effect !!!

-----------------Side Notes--------------------

(note that I add problems making games work, also the old school windows media player didn’t work)
(you can make a single bat file that lunches all your .ahk files at once.)
(I have no idea if this solution will make games’s anti-cheats ban you for false positives)

its really convenient !!!
Thanks for reading my first post.
If you fix problems I add with : Valorant, Insurency Sanstorm and windows media player, and or further explanations or tricks, comment below !!!

1 Like