Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs on Mac OS X Leopard key bindings

I'm a Mac user and I've decided to learn Emacs. I've read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard?

Also, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/option key to invoke meta instead?

update: While the control key is much easier to hit now, the meta key is also used often enough that its position on my MacBook and Apple Keyboard also deserves attention. In fact, I find that the control key is actually easier to hit, so I've remapped my control key to act as a meta key. Does anyone have a better/more standard solution?

like image 707
Kyle Cronin Avatar asked Oct 02 '08 15:10

Kyle Cronin


People also ask

What is the Meta key on Mac for Emacs?

On the Mac, Emacs can use either the option key or the command key as the META key. If the value of the variable mac-command-key-is-meta is non- nil (its default value), Emacs uses the command key as the META key. Otherwise it uses the option key as the META key.

Can you use Emacs on Mac?

Binaries for OS X. The official Emacs fully supports Mac OS X (along with GNU/Linux, Windows, DOS, and then some). You can find precompiled versions of emacs and Emacs. app at http://emacsformacosx.com/.

Can you change a key binding on Mac?

On your Mac, choose Apple menu > System Preferences, click Keyboard , then click Keyboard. Click Modifier Keys. For each modifier whose default action you want to change, click the pop-up menu, then choose the action you want performed when you press the key, or choose No Action.


1 Answers

Swapping CTRL and CAPS LOCK

  1. Go into System Preferences
  2. Enter the Keyboard & Mouse preference pane
  3. In the Keyboard tab, click Modifier Keys...
  4. Swap the actions for Caps Lock and Control.

alt text

Using ALT/OPTION as META

  1. In the menu bar, click Terminal
  2. Click Preferences...
  3. Under the Settings tab, go to the Keyboard tab
  4. Check the box labeled Use option as meta key

alt text

That's it! You should be well on your way to becoming an Emacs master!

like image 156
Kyle Cronin Avatar answered Nov 07 '22 01:11

Kyle Cronin