Previous: Remapping Commands, Up: Mastering Key Bindings in Emacs [Index]
You can pick any keyboard combination you desire—even if that key bind is already taken, so be careful. But Emacs has set aside certain keys for use by users. Generally, all keys prefixed with ‘C-c ?’ (where ‘?’ is a single character) are reserved for you, and you alone. In practice most third-party packages don’t give a hoot and will gladly stuff their own key binds in there.
The other set of reserved keys are the F-keys from ‘F5’ and onwards.
The other two prefix keys reserved to you are ‘hyper’ and ‘super’. They are remnants from ancient keyboards used in the 80s, but live on today in Emacs. Most PC-compatible keyboards won’t have a ‘super’ or ‘hyper’ key so some people rebind the Windows key and the Application Context key to be ‘hyper’ and ‘super’ instead.
If you want to use ‘hyper’ then use the prefix key ‘H-’ (e.g., ‘H-q’) and if you want ‘super’ use the prefix key ‘s-’ (lower case).
;; set keys for Apple keyboard, for emacs in OS X (setq mac-command-modifier 'meta) ; make cmd key do Meta (setq mac-option-modifier 'super) ; make opt key do Super (setq mac-control-modifier 'control) ; make Control key do Control (setq ns-function-modifier 'hyper) ; make Fn key do Hyper
Previous: Remapping Commands, Up: Mastering Key Bindings in Emacs [Index]