Map Caps Lock to change keyboard layout in Mac OS X
Solution 1
Expanding answer of @mrded for macOS Sierra.
I used Karabiner-Elements to remap caps_lock
to f19
. To this end I placed the following file karabiner.json
to ~/.karabiner.d/configuration
:
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"caps_lock": "f19"
}
}
]
}
Then I opened Keyboard preferences → Shortcuts → Input sources and selected F19
as "Select the previous input source" option.
Note also that according to Lifehacker, there is built-in feature in macOS Sierra to switch layouts with Caps Lock but it seem to work only with some layouts. (At least I don't see this feature for my layouts which are Ilya Birman's typographic Latin/Cyrillic.)
Solution 2
It depends on the version of Mac OS X you are running (on 10.13.5 it's definitely possible). System settings -> Keyboard -> Input sources -> checkbox about Caps Lock
Related videos on Youtube
Dmitry Gladkov
Updated on September 17, 2022Comments
-
Dmitry Gladkov over 1 year
I found
System Preferences → Keyboard → Modifier Keys
menu, but I can map other modifier key to it, not a keyboard shortcut. -
devmiles.com over 7 yearsOnly karabiner doesn't work with Sierra at the moment.
-
mrded over 7 yearsIt works perfect on my Sierra.
-
devmiles.com over 7 yearsonly Karabiner-Elements worked for me.
-
Shersh about 6 yearsI tried this solution but it doesn't work on macOS Sierra 10.12. When I press Caps Lock in Input Sources while trying to change hotkey for input sources, nothing happens :(