Skip to main content

Dima Kolosov

Non-modal layout switch in macOS

I saw Andrey Sitnik’s tweet about non-modal layout switch in Linux and decided to do the same in macOS.

Before that I switched the layout by pressing Caps Lock. This feature is already built into latest macOS versions, but I did it the old way with Karabiner-Elements: reassigned Caps Lock to F19, and changed layout switch to F19 in the System settings. Convenient, easy, but state problem was still here - the next layout depends on the previous one.

I decided to try non-modal mode. It’s hard to say something about it so far, first day of tuning, still need to retrain my neurons, but I like the concept itself. And as I’m writing this post, I’m already practicing.


So, how to set up:

  1. Install Karabiner-Elements and give it all necessary rights.
  2. Download config, customize it as you wish. Current configuration - Caps Lock switches to RU, and Right Shift + Caps Lock switches to EN.
  3. Move config to ~/.config/karabiner/assets/complex_modifications. Create a directory if necessary.
  4. Go to Karabiner-Elements, “Complex Modifications” tab -> Add Rule and enable the rule.