Difference between revisions of "MacOS"
From Jon's Wiki
| Line 8: | Line 8: | ||
#* left_alt → left_command | #* left_alt → left_command | ||
#* right_alt → right_command | #* right_alt → right_command | ||
| − | # In ''Settings → Complex Modifications'', Add the rule to rewrite the Right Command key (now mapped as Right Alt on USB keyboards) to Shift + Ctrl + F13. This rule should look like this: | + | # In ''Settings → Complex Modifications'', Add the rule to rewrite the Right Command key (now mapped as Right Alt on USB keyboards) to Shift + Ctrl + F13. This rule should look like this: <syntaxhighlight lang="JavaScript"> |
| − | |||
{ | { | ||
"description": "Send Shift + Ctrl + F13 on Right Command to emulate Compose Key", | "description": "Send Shift + Ctrl + F13 on Right Command to emulate Compose Key", | ||
| Line 26: | Line 25: | ||
] | ] | ||
} | } | ||
| − | + | </syntaxhighlight> | |
# Possibly restart apps if they don’t immediately pick up changes. | # Possibly restart apps if they don’t immediately pick up changes. | ||
Latest revision as of 11:05, 26 February 2026
Compose Key
- Install Karabiner-Elements, e.g. with brew install.
- Fetch the large but comprehensive
DefaultKeyBinding.dictfile from GitHub, here. This has all the X11 compose key mappings in it, plus a bunch of other nifty combinations. - . Copy it into the
~/Library/KeyBindingsdirectory. You may have to create the directory first. - In Karabiner-Elements under Settings → Simple Modifications, add the following remapping rules for any USB keyboards:
- left_command → left_alt
- left_alt → left_command
- right_alt → right_command
- In Settings → Complex Modifications, Add the rule to rewrite the Right Command key (now mapped as Right Alt on USB keyboards) to Shift + Ctrl + F13. This rule should look like this:
{ "description": "Send Shift + Ctrl + F13 on Right Command to emulate Compose Key", "manipulators": [ { "from": { "key_code": "right_gui" }, "to": [ { "key_code": "f13", "modifiers": ["left_control", "left_shift"], "repeat": false } ], "type": "basic" } ] }
- Possibly restart apps if they don’t immediately pick up changes.
References
- Goller, A (16 August 2022). “Compose Key on MacOS” (blog post), alexandergoller.com
- “Send Shift + Ctrl + F13 on Right Command to emulate Compose Key”, Gene Sy:Karabiner Complex Rules Generator, via GitHub.
- Hocevar, Sam (17 June 2012). “Setting up a real Compose key on Mac OS X” (blog post), The Lol Engine (dead link; archived 20 October 2021 by The Internet Archive).