How to Change Your Keyboard Layout on Mac OS X
Add a layout such as Dvorak or Colemak to Mac OS X, then switch to it. 10 steps.
Open the Apple menu.

Click “System Preferences”.

Click “Keyboard”.

Choose “Input Sources”.

Click the “+” button.

Select the layout’s language, e.g. English.

On the right, choose the layout you want to add, e.g. Colemak.

Click “Add”.

Select the layout you just added and close the window.

Your layout is up and running, everywhere on your Mac.
Now pick the same layout here
Choose it in Settings, and the on-screen keyboard and hands follow your new layout.