aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/custom.texi51
1 files changed, 45 insertions, 6 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index d03a0a1657f..cf4352ba951 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1341,6 +1341,7 @@ name, which usually consists of lower-case letters and hyphens.
1341* Minibuffer Maps:: The minibuffer uses its own local keymaps. 1341* Minibuffer Maps:: The minibuffer uses its own local keymaps.
1342* Rebinding:: How to redefine one key's meaning conveniently. 1342* Rebinding:: How to redefine one key's meaning conveniently.
1343* Init Rebinding:: Rebinding keys with your init file, @file{.emacs}. 1343* Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
1344* Modifier Keys:: Using modifier keys in key bindings.
1344* Function Keys:: Rebinding terminal function keys. 1345* Function Keys:: Rebinding terminal function keys.
1345* Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on. 1346* Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
1346* Mouse Buttons:: Rebinding mouse buttons in Emacs. 1347* Mouse Buttons:: Rebinding mouse buttons in Emacs.
@@ -1746,6 +1747,44 @@ that delimit the vector.
1746 Language and coding systems can cause problems with key bindings 1747 Language and coding systems can cause problems with key bindings
1747for non-@acronym{ASCII} characters. @xref{Init Non-ASCII}. 1748for non-@acronym{ASCII} characters. @xref{Init Non-ASCII}.
1748 1749
1750@node Modifier Keys
1751@subsection Modifier Keys
1752@cindex modifier keys
1753
1754 The default key bindings in Emacs are set up so that modified
1755alphabetical characters are case-insensitive. In other words,
1756@kbd{C-A} does the same thing as @kbd{C-a}, and @kbd{M-A} does the
1757same thing as @kbd{M-a}. This concerns only alphabetical characters,
1758and does not apply to ``shifted'' versions of other keys; for
1759instance, @kbd{C-@@} is not the same as @kbd{C-2}.
1760
1761 When you customize Emacs, you can make modified alphabetical
1762characters case-sensitive way. For instance, you could make @kbd{M-a}
1763and @kbd{M-A} run different commands.
1764
1765 As a special exception, a @key{Control}-modified alphabetical
1766character is always case-insensitive, for historical reasons: Emacs
1767always treats @kbd{C-A} as @kbd{C-a}, @kbd{C-B} as @kbd{C-b}, and so
1768forth.
1769
1770 Although only the @key{Control} and @key{Meta} modifier keys are
1771commonly used, Emacs supports three other modifier keys. These are
1772called @key{Super}, @key{Hyper} and @key{Alt}. Few terminals provide
1773ways to use these modifiers; the key labeled @key{Alt} on most
1774keyboards usually issues the @key{Meta} modifier, not @key{Alt}. The
1775standard key bindings in Emacs do not include any characters with
1776these modifiers. However, you can customize Emacs to assign meanings
1777to them. The modifier bits are labelled as @samp{s-}, @samp{H-} and
1778@samp{A-} respectively.
1779
1780 Even if your keyboard lacks these additional modifier keys, you can
1781enter it using @kbd{C-x @@}: @kbd{C-x @@ h} adds the ``hyper'' flag to
1782the next character, @kbd{C-x @@ s} adds the ``super'' flag, and
1783@kbd{C-x @@ a} adds the ``alt'' flag. For instance, @kbd{C-x @@ h
1784C-a} is a way to enter @kbd{Hyper-Control-a}. (Unfortunately, there
1785is no way to add two modifiers by using @kbd{C-x @@} twice for the
1786same character, because the first one goes to work on the @kbd{C-x}.)
1787
1749@node Function Keys 1788@node Function Keys
1750@subsection Rebinding Function Keys 1789@subsection Rebinding Function Keys
1751 1790
@@ -1824,12 +1863,12 @@ where @code{?\C-x} is the Lisp character constant for the character
1824@kbd{C-x}. The vector element @code{next} is a symbol and therefore 1863@kbd{C-x}. The vector element @code{next} is a symbol and therefore
1825does not take a question mark. 1864does not take a question mark.
1826 1865
1827 You can use the modifier keys @key{CTRL}, @key{META}, @key{HYPER}, 1866 You can use the modifier keys @key{Control}, @key{Meta},
1828@key{SUPER}, @key{ALT} and @key{SHIFT} with function keys. To represent 1867@key{Hyper}, @key{Super}, @key{Alt} and @key{Shift} with function
1829these modifiers, add the strings @samp{C-}, @samp{M-}, @samp{H-}, 1868keys. To represent these modifiers, add the strings @samp{C-},
1830@samp{s-}, @samp{A-} and @samp{S-} at the front of the symbol name. 1869@samp{M-}, @samp{H-}, @samp{s-}, @samp{A-} and @samp{S-} at the front
1831Thus, here is how to make @kbd{Hyper-Meta-@key{RIGHT}} move forward a 1870of the symbol name. Thus, here is how to make
1832word: 1871@kbd{Hyper-Meta-@key{RIGHT}} move forward a word:
1833 1872
1834@example 1873@example
1835(global-set-key [H-M-right] 'forward-word) 1874(global-set-key [H-M-right] 'forward-word)