Difference between revisions of "MacOS"

From Jon's Wiki
(Created page with "== Compose Key == # Install [https://karabiner-elements.pqrs.org/ Karabiner-Elements], e.g. with brew install. # Fetch the large but comprehensive <code>DefaultKeyBinding.dic...")
 
 
(One intermediate revision by the same user not shown)
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.
  
Line 33: Line 32:
 
# Goller, A (16 August 2022). [https://www.alexandergoller.com/journal/14210/compose-key-on-macos/ “Compose Key on MacOS”] (blog post), alexandergoller.com
 
# Goller, A (16 August 2022). [https://www.alexandergoller.com/journal/14210/compose-key-on-macos/ “Compose Key on MacOS”] (blog post), alexandergoller.com
 
# [https://genesy.github.io/karabiner-complex-rules-generator/#eyJ0aXRsZSI6IlJpZ2h0IENvbW1hbmQgdG8gU2hpZnQgKyBDdHJsICsgZjEzIiwicnVsZXMiOlt7ImRlc2NyaXB0aW9uIjoiU2VuZCBTaGlmdCArIEN0cmwgKyBmMTMgb24gUmlnaHQgQ29tbWFuZCB0byBlbXVsYXRlIENvbXBvc2UgS2V5IChodHRwOi8vbG9sZW5naW5lLm5ldC9ibG9nLzIwMTIvMDYvMTcvY29tcG9zZS1rZXktb24tb3MteCkiLCJtYW5pcHVsYXRvcnMiOlt7InR5cGUiOiJiYXNpYyIsImZyb20iOnsia2V5X2NvZGUiOiJyaWdodF9ndWkifSwidG8iOlt7InJlcGVhdCI6ZmFsc2UsImtleV9jb2RlIjoiZjEzIiwibW9kaWZpZXJzIjpbImxlZnRfY29udHJvbCIsImxlZnRfc2hpZnQiXX1dfV19XX0= “Send Shift + Ctrl + F13 on Right Command to emulate Compose Key”], Gene Sy:Karabiner Complex Rules Generator, via GitHub.
 
# [https://genesy.github.io/karabiner-complex-rules-generator/#eyJ0aXRsZSI6IlJpZ2h0IENvbW1hbmQgdG8gU2hpZnQgKyBDdHJsICsgZjEzIiwicnVsZXMiOlt7ImRlc2NyaXB0aW9uIjoiU2VuZCBTaGlmdCArIEN0cmwgKyBmMTMgb24gUmlnaHQgQ29tbWFuZCB0byBlbXVsYXRlIENvbXBvc2UgS2V5IChodHRwOi8vbG9sZW5naW5lLm5ldC9ibG9nLzIwMTIvMDYvMTcvY29tcG9zZS1rZXktb24tb3MteCkiLCJtYW5pcHVsYXRvcnMiOlt7InR5cGUiOiJiYXNpYyIsImZyb20iOnsia2V5X2NvZGUiOiJyaWdodF9ndWkifSwidG8iOlt7InJlcGVhdCI6ZmFsc2UsImtleV9jb2RlIjoiZjEzIiwibW9kaWZpZXJzIjpbImxlZnRfY29udHJvbCIsImxlZnRfc2hpZnQiXX1dfV19XX0= “Send Shift + Ctrl + F13 on Right Command to emulate Compose Key”], Gene Sy:Karabiner Complex Rules Generator, via GitHub.
# However, Sam (17 June 2012). [https://web.archive.org/web/20211020080809/https://lolengine.net/blog/2012/06/17/compose-key-on-os-x “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)''.
+
# Hocevar, Sam (17 June 2012). [https://web.archive.org/web/20211020080809/https://lolengine.net/blog/2012/06/17/compose-key-on-os-x “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)''.

Latest revision as of 11:05, 26 February 2026

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).