Profiles Switcher › Automations › Layout follows the keyboard
Switch the keyboard layout automatically when your keyboard changes
Create a profile that switches on when your external keyboard is attached, by USB or Bluetooth, and add a Set keyboard input source action. An everyday profile switches back to your laptop's layout when you unplug it.
- When
- USB keyboard attachedMagic Keyboard connects
- Then
- Layout: U.S.
Last updated
How to set it up
- Add both layouts to macOS. In System Settings > Keyboard > Input Sources, add every layout you use. Only layouts listed there can be chosen.
- Create the Desk keyboard profile. Add a USB device rule for a wired keyboard, or a Bluetooth device rule for a wireless one.
- Add the layout. Add Set keyboard input source and choose the layout printed on the external keyboard.
- Switch back. In your Everyday profile (every day, priority 9), add Set keyboard input source with your laptop keyboard’s layout.
Get Profiles Switcher on the Mac App Store, for macOS 13 or later
Permission needed: Bluetooth (for the Bluetooth rule). See permissions in the help guide.
Two keyboards, one layout setting
Many people type on a laptop with one layout, German for example, and plug in an external keyboard with another, such as U.S. English, at the desk. macOS has one active input source at a time, so the keys stop matching their labels the moment you switch keyboards, until you change the layout by hand from the menu bar.
A profile tied to the external keyboard does it for you. Plug it in or turn it on, and the layout switches; unplug it, and your Everyday profile puts the laptop layout back.
Picking the right rule
- USB device: wired keyboards and keyboards on a USB receiver. Choose “Any device of this type” unless you share identical keyboards and need to tell them apart.
- Bluetooth device: wireless keyboards such as the Magic Keyboard. You can pick by address, which keeps working even if you rename the keyboard.
With “Any is true” either keyboard switches the layout, so the same profile covers the office’s wired keyboard and your own wireless one.
Beyond keyboards
The same action is useful for bilingual setups that depend on place rather than hardware: a profile on your home Wi-Fi switches to your first language, the office profile to English. For travel, the time zone recipe can switch to a local input method when you land.
Frequently asked questions
Can it switch between languages, not just layouts?
Yes. Any input source you add in System Settings works, including input methods such as Japanese, Korean or Chinese.
Can I switch layouts by place instead?
Yes. Use a Wi-Fi or location rule instead of the keyboard rule, for example French at home and English at the office.
Does the Bluetooth keyboard rule need a permission?
Yes, Bluetooth permission. The USB rule needs none.
Related automations
Set it up in a few minutes
Profiles Switcher is a menu bar app for Mac (macOS 13 or later, Apple Silicon and Intel) that switches your Mac's setup automatically. You build profiles from 19 triggers, such as the Wi-Fi network you join, a place, headphones or a display, and 18 actions, including running any of your Shortcuts. Everything runs on your Mac; it is available on the Mac App Store.
Download on the Mac App Store