diff options
| -rw-r--r-- | doc/emacs/custom.texi | 51 |
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 |
| 1747 | for non-@acronym{ASCII} characters. @xref{Init Non-ASCII}. | 1748 | for 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 | ||
| 1755 | alphabetical 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 | ||
| 1757 | same thing as @kbd{M-a}. This concerns only alphabetical characters, | ||
| 1758 | and does not apply to ``shifted'' versions of other keys; for | ||
| 1759 | instance, @kbd{C-@@} is not the same as @kbd{C-2}. | ||
| 1760 | |||
| 1761 | When you customize Emacs, you can make modified alphabetical | ||
| 1762 | characters case-sensitive way. For instance, you could make @kbd{M-a} | ||
| 1763 | and @kbd{M-A} run different commands. | ||
| 1764 | |||
| 1765 | As a special exception, a @key{Control}-modified alphabetical | ||
| 1766 | character is always case-insensitive, for historical reasons: Emacs | ||
| 1767 | always treats @kbd{C-A} as @kbd{C-a}, @kbd{C-B} as @kbd{C-b}, and so | ||
| 1768 | forth. | ||
| 1769 | |||
| 1770 | Although only the @key{Control} and @key{Meta} modifier keys are | ||
| 1771 | commonly used, Emacs supports three other modifier keys. These are | ||
| 1772 | called @key{Super}, @key{Hyper} and @key{Alt}. Few terminals provide | ||
| 1773 | ways to use these modifiers; the key labeled @key{Alt} on most | ||
| 1774 | keyboards usually issues the @key{Meta} modifier, not @key{Alt}. The | ||
| 1775 | standard key bindings in Emacs do not include any characters with | ||
| 1776 | these modifiers. However, you can customize Emacs to assign meanings | ||
| 1777 | to 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 | ||
| 1781 | enter it using @kbd{C-x @@}: @kbd{C-x @@ h} adds the ``hyper'' flag to | ||
| 1782 | the 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 | ||
| 1784 | C-a} is a way to enter @kbd{Hyper-Control-a}. (Unfortunately, there | ||
| 1785 | is no way to add two modifiers by using @kbd{C-x @@} twice for the | ||
| 1786 | same 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 |
| 1825 | does not take a question mark. | 1864 | does 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 |
| 1829 | these modifiers, add the strings @samp{C-}, @samp{M-}, @samp{H-}, | 1868 | keys. 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 |
| 1831 | Thus, here is how to make @kbd{Hyper-Meta-@key{RIGHT}} move forward a | 1870 | of the symbol name. Thus, here is how to make |
| 1832 | word: | 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) |