Map Caps Lock to change keyboard layout in Mac OS X

7,912

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

Share:
7,912

Related videos on Youtube

Dmitry Gladkov
Author by

Dmitry Gladkov

Updated on September 17, 2022

Comments

  • Dmitry Gladkov
    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
    devmiles.com over 7 years
    Only karabiner doesn't work with Sierra at the moment.
  • mrded
    mrded over 7 years
    It works perfect on my Sierra.
  • devmiles.com
    devmiles.com over 7 years
    only Karabiner-Elements worked for me.
  • Shersh
    Shersh about 6 years
    I 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 :(