Emacs: Re-mapping the Control and Meta Keys on Mac OS X
Since I’ve started playing around with Clojure again I thought it’d make sense to use emacs as my editor and therefore needed to work out how to remap the Ctrl and Meta to keys which are more accessible on the MBP’s keyboard.
I’ve found that I like using the Caps Lock for Ctrl and that’s reasonably easy to change by navigating to 'System Preferences > Keyboard > Modifier Keys':
The Meta key is Escape by default and I wanted to map it to the right Command key as that’s much easier for me to get to.
I couldn’t find a way to do that through System Preferences but found KeyRemap4MacBook which seems to do the job.
We can change the key mapping by navigating to 'System Preferences > KeyRemap4Macbook > Change Key':
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.