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 swap
I would like to recommend 2 softwares Seil and Karabiner. By simply installing Seil and following the instructions in the software, you should be able to achieve what you want. From my experience, Karabiner is more powerful. I have a Japanese keyboard whose layout is different from the normal ones. I have some snippet which remaps two extra keys on my keyboard to F18 and F19 for other use. You can use the same syntax to edit your "private.xml" file to do more things.
Personally i have setup caps lock to behave like command on the system preferences and then on my emacs init.el file have:
(setq mac-command-modifier 'ctrl)
and this lets me use caps lock as command in most osx applications and as control in emacs. works well enough for me.
I've created a fairly comprehensive set of bindings here for use outside of Terminal.
Personally, I can't use the mac laptop keyboard due to the absence of the right control key.
Instead, I have been using the Microsoft Natural Ergonomic Keyboard 4000 for over 7 years: it's got really fat, well-positioned Ctrl and Alt keys, and after downloading its drivers the "Start" and "Application" keys are trivially remapped to the Mac Cmd key, which is also fat and easily depressed.
To avoid emacs ergonomic concerns I've trained myself to use Ctrl, Alt, and Cmd the same way we use Shift - depressing them with the hand opposite the one typing the actual key. (That is, I just leave Caps Lock as is.)
The other answer was very complete, but additionally I'd mention I just set the caps lock key to a second control key instead of swapping them.
Also, you'll notice that the large majority of the text entry fields in Mac OS X already accept emacs keystrokes (^A beginning of line, ^E end of line, ^P, ^N, ^K, ^Y, etc)
good luck
Swapping CTRL and CAPS LOCK
Using ALT/OPTION as META
That's it! You should be well on your way to becoming an Emacs master!
If you use emacs over an ssh connection, or through a machine not on your local computer, the page up/page down buttons scroll through the terminal buffer - in my experience, not too helpful.
You can set your page down and page up buttons to send the appropriate commands to emacs. In emacs, you can scroll through the emacs buffer like so:
So, to have the terminal send these commands to emacs, follow the instructions above to alter the Alt keys for Meta. However, instead of setting the "use option as meta" option, find the "page down" and "page up" options.
Page Down
Double click the "page down" option to edit it. Change Action to "send string to shell" and enter \026 as the string. Save it.
Page Up
Double click the "page up" button to edit it. Change Action to "send string to shell" and enter \033v as the string. Save it.