I'm trying to build script which lowers volume once when hotkey is held down and after key is released volume is set back to normal/previous volume. This same key (when hold down) should also send input like normal key.
Case:
- Hold down w -key volume is lowered only once and w is sent multiple times (like normal key hold)
- Release w -key volume is set back to normal
Here is my current script which works for volume as described:
$w::
SoundGet OldVolume
SoundSet, -20
KeyWait, w
w UP::SoundSet OldVolume
return
I did try to make loop to send w when hold down but then volume adjustment did not work anymore.
I'm not sure if this multiaction is even possible where key press should do something only once and something else multiple times. Any help appreciated!