Modern Windows 10 and 11 versions have plenty of various hotkeys that automate tasks and allow doing things much faster. However, for some reason, there is no hotkey for switching audio devices. Instead, customers need to use the Settings app and the outdated Control Panel.
Fortunately, third-party apps can save the day. If you switch between different audio devices frequently, creating a dedicated hotkey will make your life much easier. There are several ways to change audio devices with a hotkey in Windows 10 and 11, and this article will list the most convenient ones.
Note. Although we use Windows 10 and 11, the most recent and the only supported versions, this guide also applies to Windows 7.
How to Switch Audio Devices in Windows 10/11?
Before we dig deeper into creating an audio device switch hotkey in Windows 10 and 11, let us show you how to toggle between audio output devices in Microsoft’s latest operating systems. Here is how you do that in Windows 11:
- Press Win + A or click the network/volume/battery button in the bottom-right corner.
- Click the icon with a speaker next to the volume slider.
- Select the desired audio output device.
You can also take another route:
- Open Windows Settings by pressing Win + I and go to the System section.
- Click Sound.
- Select an audio output device from the Choose where to play sound drop-down list.
Finally, you can use the old Control Panel (this will also work in Windows 10, 8.1, 8, and 7):
- Press Win + R and type control.
- Navigate to Hardware and Sound > Sound.
- On the Playback tab, right-click the desired output device and select Set as default Device.
Now let us show you how to create a hotkey or shortcut for audio device switching in Windows 10 and 11.
Change Audio Devices with Hotkey using AutoHotkey
You can create hotkeys for switching audio devices in Windows 10 and 11 using the AutoHotkey app. It is a popular automation tool that lets you create custom shortcuts using different scripts. AutoHotkey app is free; you can download it from the official website.
- Download and install AutoHotkey from the official website.
- Click Install on the first screen. You can leave everything as is and not change the installation properties.
- Click New script and give the file a name. You can keep it in the default location.
- Click Create.
- AutoHotkey will open a new File Explorer window with your script. Open the script in Notepad.
- Copy and paste the following script into Notepad:
*F6::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 4}
ControlClick,&Set Default
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 3}
ControlClick,&Set Default
ControlClick,OK
return - Press Win + R and type mmsys.cpl.
- Note the order of your playback devices on the Playback tab. For example, in the screenshot below, the default speakers are seventh on the list. Therefore, change {Down 4} to {Down 7}. The number in the brackets indicates how many times AutoHotkey should click down to select the needed audio output device.
- Note the number of the second audio device and change its {Down} value in the second part of the script accordingly.
- Another thing worth noting is that the script above assigns one output device to the F6 key and another to the F7 key. Replace F6 and F7 in the script with the keys you want if necessary.
- Save the script and run it. Now you can switch between your audio devices with the F6 and F7 keys.
How to Switch Between Audio Devices in Windows 10 and 11?
AutoHotkey is a powerful app that can do marvels with skilled hands. However, it is also not for inexperienced users who have no time to learn how scripting works. If you need something more user-friendly and intuitive, here are two apps that will make switching audio devices in Windows 10 and 11 a breeze.
- Download the EarTrumpet app from the Microsoft Store. It is a free, open-source app for managing sound on Windows 10 and 11.
- Installing the app will place a new volume indicator in the notification area. You can hide the stock indicator if you use Windows 10. If you use Windows 11, you will have to deal with two volume indicators on the taskbar.
- Right-click EarTrumpet’s icon in the notification area and select the desired audio output device.
Another app is Audio Switcher. It is also free and open source; you can download it from the official website. Unlike EarTrumpet, Audio Switcher lets you manage both playback and recording devices.
- Download Audio Switcher from the official website. If downloading from the official website does not work, use the GitHub page.
- Open the zip archive and extract the AudioSwitcher.exe file to a convenient location. Installation completed!
- Run the executable file. Right-click the AudioSwitcher icon and select Open Preferences.
- Place a checkmark next to the Start when Windows starts option. It will ensure Audio Switcher works whenever your PC is running.
- Place a checkmark next to the Show Default Playback Device icon in tray option.
- Place a checkmark next to the Start minimized option.
- Open the Playback tab and specify which device should be your default audio output.
- Now you can switch between headphones and speakers in just two clicks: right-click the Audio Switcher icon in the notification area and select the desired playback device from the pop-up list.
Now here is how to assign shortcut keys for switching audio devices in the Audio Switcher app:
- Go to the Playback tab and right-click the audio device.
- Select Set Hot Key.
- Click Hot Key and type the necessary shortcut or a single key. Make sure you use available shortcuts to avoid conflicts with other features and apps.
- Click Save.
And that is how you change audio devices in Windows 10 and 11 with shortcut keys.
- Lens Kubernetes IDE – Opensource Lens Desktop - January 27, 2023
- Using Select-Object Cmdlet in PowerShell - January 26, 2023
- How to Turn Off Siri Suggestions on iPhone? - January 25, 2023
Thanks this was exactly what I was looking for. I have a 3 screen set up. 2 monitors on my desk and a HD TV. The main computer monitor and HD TV are clones using an HDMI splitter. I use the TV when I’m laying on the couch or watching youtube/movies from the computer. It was a pain having to always go into sound options and switch form computer speakers and TV speakers constantly. Now all I do is hit a button and it’s done! Tip for others: After you change the code be sure to right click the program and select reload script! :D
Thanks! Yes, I have been using this non-stop at work to switch between my primary speakers and headphones :) Actually saves a lot of time if you add up all the times you have to switch. I edited the post and added the ‘reload script’ part. I forgot to do that :) Thanks.
Hi for some reason this script only opens the sound device selection window. when i press either hotkey. i followed all steps i only have 2 sound devices so i set it to 1 and 2. what is wrong?
also is there a way to set 1 toggle key instead of two hotkeys?
OK figured it out.. after poking around a bit. i had to change
WinWait,Sound to WinWait,Ljud
and
ControlClick,&Set Default to ControlClick,&Standard
which it is int swedish version of windows.
but a toggle would still be nice :)
Tack för hjälpen där, Hannes! Nu fungerar det!
Your very welcome… seeing from Google translator… I’m assuming you said the following?? “Thanks for the help there, Hannes! Now it works!”
How can I modify this to change the default recording device?
*F8::
Run, mmsys.cpl
WinWait,Sound
Send {TAB 3}{RIGHT}
ControlSend,SysListView321,{Down 1}
ControlClick,&Set Default
ControlClick,OK
return
Follow the directions in the original how-to to change the hotkey and determine your recording device number.
Protip: Change playback and recording devices in one swoop
*F6::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 3}
ControlClick,&Set Default
ControlClick,OK
Run, mmsys.cpl
WinWait,Sound
Send {TAB 3}{RIGHT}
ControlSend,SysListView321,{Down 1}
ControlClick,&Set Default
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 2}
ControlClick,&Set Default
ControlClick,OK
Run, mmsys.cpl
WinWait,Sound
Send {TAB 3}{RIGHT}
ControlSend,SysListView321,{Down 2}
ControlClick,&Set Default
ControlClick,OK
return
I used this to disable/enable my mic, but you can modify to change your default recording device:
#z::
Run, mmsys.cpl
WinWaitActive,Sound ; Wait for window to appear
Control,TabRight, 1, SysTabControl321 ; Select second tab
Sleep 10 ; Wait for tab, modify as needed
ControlSend,SysListView321, {Down 1} ; In the list of devices, select the mic to disable
Send {Shift}+{f10} ; Right-click
Sleep, 20 ; Wait for menu, modify as needed
SendPlay {Down} ; Arrow down to Disable/Enable
Send {Enter} ; Select
;ControlClick OK ; Exit
Hope it helps,
Great comment, thanks for the tip!
Like Hannes already found out, the script as it is here only works for english versions of windows.
So for everyone who hadn’t figured it out form the post, the hints for how to make this work for any language version of windows are in the script.
1; after WinWait, the word should be the same as the name of your audio panel(on top it says the name: Sound in English, Ljud in Swedish and in my case, Geluid in Dutch)
2; after ControlClick, the text should be the same as the center button on the audio panel, the one to set the dafault ( Set Default in English, Standard in English, Als standaard instellen in Dutch)
This should get you to figure it out in any language, and remember to pay attention to capitals.
just wanna say thanks!! this is really gonna make switching sound devices easier
Great Stuff, after some enhancements from Hannes June 15 it’s working perfect!
Also I agree with Hannes – to toggle the source would be really nice ;-)
..got no Idea how to do this (to toggle sources) ?!
Many thanks, just what wanted works a treat.
It is working fine, but my sound device is keep changing one to another automatically so when i open windows media player sound is discontinued in second interval. Try disabling the second digital audio device but result is same, pls help me
Hi, thx for this, it’s really helpfull, i was just wondering if there is also a way to get not altabbed when playing a game for example and you pres f6 or f7?
For all non-english windows users; you have to change the file according to the following pattern:
ControlClick,&***
where *** is what the drop-down button in sound devices says when a non-standard device is selected,
WinWait,#
where # is the term that is used instead of “sound” in your windows version.
For example, in german Win7 it’s
WinWait,Sound
ControlClick,&Als Standard
Skrypt zmieniający automatycznie domyślne urządzenie audio w win7:
For Polish UI working code is:
*F6::
Run, mmsys.cpl
WinWait,Dźwięk
ControlSend,SysListView321,{Down 1}
ControlClick,&Ustaw domyślne
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Dźwięk
ControlSend,SysListView321,{Down 2}
ControlClick,&Ustaw domyślne
ControlClick,OK
return
Thank you so much! exactly what i was looking for, only wish I came across this article sooner
Glad it helped!
I love you man! I just bought G930 headset and was facing this same problem,…big thanks!
We love the G930s :) !
Thanks a bunch for this. So much easier with this script !
SOmehow it doesn`t work for me i follow the steps excactly as you say i did it again but nothing when i press the fuction keys it just open the panel of the playback devices and that all the command stops there
i guess i have to change the commands in my language but still nothing does the script understands the Greek characters?
Great! Thanks for the tip. I will give that a try and probably update the post.
A way to toggle this would be fantastic, is there a way to have it check if one is currently active and then switch to the one which is not active? Out of two chosen devices of course, if this can be done it would help me greatly as I’d like to only have one macro key taken up with this.
I don’t know of a way to automatically toggle this. Check on the autohotkey.com forums… they might have some new updates from someone that could do this.
Even simpler is to use FastKeys, It handles this very well plu has tons of other features – you can even import full AHK scripts. Check fastkeys.vze.com.
Thank you for your comment! I will have to check that out.
Would be useful if you could type it out so I could copy and paste it in to avoids typos and misreading etc. Thanks.
Thank you for your comment, I have pasted the contents of the .ahk file above now in Step 3.
SoundSwitch didn’t exist when we originally wrote this. I just gave that a try and it works great! We just edited our article and put your suggestion at the bottom of the post. Thanks for your comment!
I Brian!
I’ve been trying for 2h now to make this to work and without success…
My default windows language is “Portuguese”.
I’ved tried everything i could think off…
The portuguese word for “sound” is “Som”.
Thanks
Thank you, works great!
Great, glad it helped!
For Windows 8 small change is required (because of two default output devices, for playback and communication):
*F6::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 4}
ControlClick,&Set Default
ControlSend,SysListView321,{Down 1}
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 3}
ControlClick,&Set Default
ControlSend,SysListView321,{Down 1}
ControlClick,OK
return
Great. Thank you for sharing with our readers.
Hi! This script has worked for me beautifully! Thanks! But I want to ask, how do I do the same thing, but for recording devices? What part of the script would I have to replace? Thanks again!
Good question. This is worth a blog post.
For the Finnish Windows 8.1 users:
*F6::
Run, mmsys.cpl
WinWait,Ääni
ControlSend,SysListView321,{Down 3}
ControlClick,&Aseta oletus
ControlSend,SysListView321,{Down 1}
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Ääni
ControlSend,SysListView321,{Down 2}
ControlClick,&Aseta oletus
ControlSend,SysListView321,{Down 1}
ControlClick,OK
return
How do you change the order in which devices are listed? Everytime I plug in a headset the order changes and everything goes to hell.
Great script – thanks for sharing!
Awesome! This is exactly what I needed! Thank you!
This worked perfectly! I love ahk!!! Thank you.
btw to avoid accidental keypresses I switched the *F6 to +F6 which is shift + F6 pressed together as the hot key.
Hi, this did now work for me.
The only way I can switch between my speakers and headphones is if I disable the other. Is there a script where you can enable/disable speakers and my G930 headset?
Thank you
If you need it to toggle here is a simple switch:
soundSwitch = 1
*F2::
Run, mmsys.cpl
WinWait,Sound
if soundSwitch = 1
{
ControlSend,SysListView321,{Down 1}
ControlClick,&Set Default
ControlClick,OK
soundSwitch = 2
}
else
{
ControlSend,SysListView321,{Down 2}
ControlClick,&Set Default
ControlClick,OK
soundSwitch = 1
}
return
put that into your autohotkey.ahk and press F2 :)
Thanks for the great script! Windows 10 requires slightly different action for the default button though, as it now has a drop down.
*F6::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 2} ; This is my headphones
ControlFocus,&Set Default
Send,{Down 2}
Send,{Enter}
ControlClick,OK
return
*F7::
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 3} ; This is the laptop speakers
ControlFocus,&Set Default
Send,{Down 2}
Send,{Enter}
ControlClick,OK
return
I mapped my headphones to ^!h and speakers to ^!s. (I use ctrl-alt-key so as to not interfere with Visual Studio)
With this should work in all languages
I have windows 10 italian, couldn’t make the script working
you only need to change:
WinWait, Sound <— change SOUND with the title of the window in your language
example: in italian: WinWait, Audio
and of course change the number of your device
Run, mmsys.cpl
WinWait,Sound
ControlSend,SysListView321,{Down 3}
Send !{E}
ControlClick,OK
return
With this should work in all languages
I have windows 10 italian, couldn’t make the script working
you only need to change:
WinWait, Sound <— change SOUND with the title of the window in your language
example: in italian: WinWait, Audio
and of course change the number of your device
Run, mmsys.cpl
WinWait, Sound ;change with the title of window in your language
ControlSend,SysListView321,{Down 3} ;change with the device you need to change
Send !{E} ;change E, explained below
ControlClick,OK
return
ps. info for the E or other key:
1. open the audio device window
2. click ALT key
3. now only a letter in buttons is underlined
4. that mean you are able to activate this button with: ALT + (underlined letter) key combination
5. change the script with the letter you need
ps. this same comment was detected as spam. wtf?