Is there a way to map caps lock to switch keyboard layout on MS-Windows 10?

Solution 1:

First you may read info on how to set default shortcuts: Shortcuts for switching keyboard layout

On Windows 10 there is a new feature: you can switch with ⊞ Win+Space (just test and see)

Here is an approach with Caps Lock for Windows 7: Capslock to switch layout
Similar AHK script works on Windows 10 as well.

To summarize tested and working Autohotkey approaches:

###Option 1. Bind Caps Lock to simulate Alt+Shift

First make sure that Alt+Shift is the default key combo. Use this AHK script:

capslock::
    send {Lalt down}{Shift}{Lalt up}
return 

###Option 2. Bind Caps Lock to the new ⊞ Win+Space combo

I'd prefer this because it gives good visual feedback when switching.

Here is the script to bind it to Caps Lock:

sel := 0

#if (sel=0)
capslock::
    send {lwin down}{Space}
    sel := 1
return 
#if

capslock up::
    send {lwin up}
    sel := 0
return