Next: , Up: Mac OS


F.1 Keyboard and Mouse Input on Mac

On Mac, Emacs can use <control>, <command>, and <option> keys as any of Emacs modifier keys except <SHIFT> (i.e., <ALT>, <CTRL>, <HYPER>, <META>, and <SUPER>). The assignment is controlled by the variables mac-control-modifier, mac-command-modifier, and mac-option-modifier. The value for each of these variables can be one of the following symbols: alt, control, hyper, meta, super, and nil (no particular assignment). By default, the <control> key works as <CTRL>, and the <command> key as <META>.

For the <option> key, if mac-option-modifier is set to nil, which is the default, the key works as the normal <option> key, i.e., dead-key processing will work. This is useful for entering non-ASCII Latin characters directly from the Mac keyboard, for example.

Emacs recognizes the setting in the Keyboard control panel (Mac OS Classic) or the International system preference pane (Mac OS X) and supports international and alternative keyboard layouts (e.g., Dvorak) if its script is either Roman, Japanese, Traditional Chinese, Korean, Cyrillic, Simplified Chinese, or Central European. Keyboard layouts based on Unicode may not work properly. Selecting one of the layouts from the keyboard layout pull-down menu will affect how the keys typed on the keyboard are interpreted.

Mac OS intercepts and handles certain key combinations (e.g., <command>-<SPC> for switching input languages). These will not be passed to Emacs. One can disable this interception by setting mac-pass-command-to-system or mac-pass-control-to-system to nil.

Especially for one-button mice, the multiple button feature can be emulated by setting mac-emulate-three-button-mouse to t or reverse. If set to t (reverse, respectively), pressing the mouse button with the <option> key is recognized as the second (third) button, and that with the <command> key is recognized as the third (second) button.

For multi-button mice, the wheel button and the secondary button are recognized as the second and the third button, respectively. If mac-wheel-button-is-mouse-2 is set to nil, their roles are exchanged.