Skip to content

Instantly share code, notes, and snippets.

@thefloodshark
Created May 3, 2025 01:07
Show Gist options
  • Save thefloodshark/0e1b36e57e60b7c7101e7350eb3912e5 to your computer and use it in GitHub Desktop.
Save thefloodshark/0e1b36e57e60b7c7101e7350eb3912e5 to your computer and use it in GitHub Desktop.
Hotkey that Toggles Between Audio Outputs (tested on Windows 11)
; script starts by opening the Sound Output panel directly with Windows Key + CTRL + V, them manually selects output depending on amount of up/down arrow key inputs
; set # of ups/downs to coincide with desired output. alter time delays if needed. can also alter or add hotkeys, the latter depending on # of outputs
; tested only on Windows 11
^!a:: ; set hotkey to toggle to designated output - currently using Ctrl + Alt + A
{
; open sound output settings directly on Windows 11
Send, #^{v}
Sleep, 500
; this will select the second output in the list
Send, {Down}
Sleep, 400
; presses enter, selecting the output
Send, {Enter}
Sleep, 100
; closes audio panel
Send, {Esc}
}
return
^!z:: ; set hotkey to toggle to a second output; currently using Ctrl + Alt + Z
{
Send, #^{v}
Sleep, 500
Send, {Up}
Sleep, 400
Send, {Enter}
Sleep, 100
Send, {Esc}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment