Browse the docs

Switch keyboard layout

Switches the active keyboard layout to one that is installed, by name.

Switch keyboard layout to name

Keyboard Maestro: SetKeyboardLayout

Details #

Selects the keyboard layout called name, as listed in System Settings > Keyboard > Input Sources. The match ignores case and checks, in order:

  1. The layout's displayed name, such as U.S., French or Dvorak.

  2. Its input source identifier, such as com.apple.keylayout.US.

  3. The last part of an identifier, so US finds com.apple.keylayout.US.

Only keyboard layouts that you can select are considered. The step has no output.

Parameters #

ParameterTypeRequiredValuesWhat it does
layouttextAnother spelling of name.
nametextThe layout's name or identifier. Required.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Replace the name with a layout you have installed, since this really switches layouts:

Switch to the U.S. layout (really switches layouts)
Do
  1. Switch the keyboard layout to “U.S.”
  2. Show “Keyboard: U.S.”
Open in Switchboard to try it

Gotchas #

  • A layout that is not installed fails with "no keyboard layout called …" followed by the installed names, so you can copy one.

  • Add the layout first in System Settings if it is missing. The step only switches among the ones you have.

  • In a dry run the step is simulated.

See also #

Type text, Press keys