Direct and Composition Mode - macOS
Overview
KeyMagic for macOS types in one of two ways, depending on the app:
- Direct mode (default): text goes straight into the app as you type. When a keyboard rule changes earlier characters, KeyMagic replaces them in place.
- Composition mode: the text you’re composing is shown underlined until it’s finished, then committed.
Both modes produce the same final text. The only difference is how the text looks while you type.
Direct mode is the default for all apps, the same as on Windows. It works in most apps, including Safari, Chrome, Notion, Microsoft Word, TextEdit and chat apps.
Which apps use composition mode
Some apps need composition mode to show text correctly. KeyMagic uses it for:
- Terminals, by default: Terminal, iTerm2, Ghostty, Warp, kitty, Alacritty, WezTerm and Hyper.
- Apps that don’t report where the caret is, such as Photoshop. KeyMagic switches these to composition mode by itself, so you don’t need to add them.
- Any app you add to the composition mode list.
Adding an app to composition mode
If text comes out wrong in an app, for example characters are duplicated or the caret jumps, try composition mode for that app.
- Open the KeyMagic app from the Applications folder or Launchpad.
- Click Settings in the sidebar.
- Under Typing, find Underline composing text in these apps and click + Add App….
- Pick the app from the list of running apps, or search for it. If the app isn’t running, enter its bundle ID instead, for example
com.apple.TextEdit. - Click Add.
The change takes effect the next time you switch to that app. You don’t need to restart it.
To move an app back to direct mode, click the × next to it in the list.
In the KeyMagic app: Settings → Typing → + Add App…
Finding an app’s bundle ID
You only need this when the app isn’t running.
- Terminal: run
osascript -e 'id of app "Application Name"'. For example,osascript -e 'id of app "Safari"'givescom.apple.Safari. - Finder: right-click the app, choose Show Package Contents, open
Contents/Info.plistand look forCFBundleIdentifier.
Troubleshooting
If text comes out wrong in one app:
- Add the app to composition mode (see above) and try again.
- Make sure KeyMagic is added in System Settings → Keyboard → Input Sources and selected.
- Switch to another app and back.
- If the app was already running when KeyMagic was installed or updated, quit and reopen it.
If an app works badly in composition mode, remove it from the list to go back to direct mode.
Upgrading from an earlier version
Before KeyMagic 3 0.0.12, composition mode was the default on macOS and apps had to be added to a direct mode list. The first time a newer version runs, KeyMagic moves your settings over: the old direct mode list is no longer used, and terminals are put in the composition mode list.