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:
The layout's displayed name, such as
U.S.,FrenchorDvorak.Its input source identifier, such as
com.apple.keylayout.US.The last part of an identifier, so
USfindscom.apple.keylayout.US.
Only keyboard layouts that you can select are considered. The step has no output.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
layout | text | Another spelling of name. | ||
name | text | The 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 the keyboard layout to “U.S.”
- Show “Keyboard: U.S.”
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.