My findings on this topic:
I stumbled across an AutoHotKey_L library while trying to overwrite my keyboard's
Volume_Down global hotkeys.
The purpose was to be able to control master volume while running restrictive, key press consuming fullscreen applications/games (Bethesda's games as an infamous example).
The functions are pretty straightforward, so I'll just post a little example:
newVol := VA_GetMasterVolume() + 5
newVol := VA_GetMasterVolume() - 5
In principle, this code contains everything you'll need. It overwrites both keys to do the same as before, but instead of relying on the OS to catch the keypress, AutoHotkey sets the volume by itself. Of course, you can specify any other hotkey.
Since there doesn't seem to be a built-in function to change the volume relatively, you'll have to get the current volume first and then in-/ decrease it at will (here:
VA_SetMasterVolume accepts values between 0.0 and 100.0, inclusive.
To get this working in a restrictive fullscreen windows, it was sufficient to call the
#UseHook directive at the top of my script.
- Library download: Vista Audio Control
- VA Online