Skip to content

How to use keyboardSwitcher to automatically change the layout when a bluetooth keyboard is present

Lutzifer edited this page Nov 30, 2015 · 2 revisions

Install keyboardSwitcher on your machine

In your terminal, run

brew tap lutzifer/homebrew-tap
brew install keyboardSwitcher

Test the installation by running

keyboardSwitcher get

Setup Control Plane

  1. Download and install control plane from http://www.controlplaneapp.com
  2. Launch control plane, then activate the bluetooth Evidence source. activate bluetooth
  3. Create 2 contexts:
  • English
  • German setup contexts
  1. Add two rules to activate the context when the keyboard is present/not present german rule u.s. rule
  2. Create shellscripts for every language and save them to a folder, e.g. Documents/Shellscripts in your home folder:
#!/bin/sh
/usr/local/bin/keyboardSwitcher select U.S.

and

#!/bin/sh
/usr/local/bin/keyboardSwitcher select German

and set them to activate when the context gets active in the action pane:

setup actions

Now, when the keyboard is being connected or disconnected, the corresponding input language is selected.