MacOS

From Jon's Wiki
Revision as of 11:05, 26 February 2026 by Johnno (talk | contribs) (→‎Compose Key)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Compose Key

  1. Install Karabiner-Elements, e.g. with brew install.
  2. Fetch the large but comprehensive DefaultKeyBinding.dict file from GitHub, here. This has all the X11 compose key mappings in it, plus a bunch of other nifty combinations.
  3. . Copy it into the ~/Library/KeyBindings directory. You may have to create the directory first.
  4. 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
  5. 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"
         }
       ]
     }
    
  6. Possibly restart apps if they don’t immediately pick up changes.

References

  1. Goller, A (16 August 2022). “Compose Key on MacOS” (blog post), alexandergoller.com
  2. “Send Shift + Ctrl + F13 on Right Command to emulate Compose Key”, Gene Sy:Karabiner Complex Rules Generator, via GitHub.
  3. 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).