mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-04 11:40:22 +00:00
Minor cleanups. Refer to "graphical" terminals, rather than X.
This commit is contained in:
parent
0939d23bcd
commit
a85cdd1f74
@ -39,8 +39,7 @@ holding down the @key{CTRL} key while pressing @kbd{a}.
|
||||
have special keys you can type them with: for example, @key{RET},
|
||||
@key{TAB}, @key{DEL} and @key{ESC}. The space character is usually
|
||||
referred to below as @key{SPC}, even though strictly speaking it is a
|
||||
graphic character whose graphic happens to be blank. Some keyboards
|
||||
have a key labeled ``linefeed'' which is an alias for @kbd{C-j}.
|
||||
graphic character whose graphic happens to be blank.
|
||||
|
||||
Emacs extends the @acronym{ASCII} character set with thousands more printing
|
||||
characters (@pxref{International}), additional control characters, and a
|
||||
@ -54,31 +53,28 @@ distinguish them.
|
||||
|
||||
But the Emacs character set has room for control variants of all
|
||||
printing characters, and for distinguishing between @kbd{C-a} and
|
||||
@kbd{C-A}. The X Window System makes it possible to enter all these
|
||||
characters. For example, @kbd{C--} (that's Control-Minus) and @kbd{C-5}
|
||||
are meaningful Emacs commands under X.
|
||||
@kbd{C-A}. Graphical terminals make it possible to enter all these
|
||||
characters. For example, @kbd{C--} (that's Control-Minus) and
|
||||
@kbd{C-5} are meaningful Emacs commands on a graphical terminal.
|
||||
|
||||
Another Emacs character-set extension is additional modifier bits.
|
||||
Only one modifier bit is commonly used; it is called Meta. Every
|
||||
character has a Meta variant; examples include @kbd{Meta-a} (normally
|
||||
written @kbd{M-a}, for short), @kbd{M-A} (not the same character as
|
||||
@kbd{M-a}, but those two characters normally have the same meaning in
|
||||
Emacs), @kbd{M-@key{RET}}, and @kbd{M-C-a}. For reasons of tradition,
|
||||
we usually write @kbd{C-M-a} rather than @kbd{M-C-a}; logically
|
||||
speaking, the order in which the modifier keys @key{CTRL} and @key{META}
|
||||
are mentioned does not matter.
|
||||
written @kbd{M-a}, for short), @kbd{M-A} (different from @kbd{M-a},
|
||||
but they are normally equivalent in Emacs), @kbd{M-@key{RET}}, and
|
||||
@kbd{M-C-a}. That last means @kbd{a} with both the @key{CTRL} and
|
||||
@key{META} modifiers. We usually write it as @kbd{C-M-a} rather than
|
||||
@kbd{M-C-a}, for reasons of tradition.
|
||||
|
||||
@cindex Meta
|
||||
@cindex M-
|
||||
@cindex @key{ESC} replacing @key{META} key
|
||||
Some terminals have a @key{META} key, and allow you to type Meta
|
||||
characters by holding this key down. Thus, @kbd{Meta-a} is typed by
|
||||
holding down @key{META} and pressing @kbd{a}. The @key{META} key
|
||||
works much like the @key{SHIFT} key. Such a key is not always labeled
|
||||
@key{META}, however, as this function is often a special option for a
|
||||
key with some other primary purpose. Sometimes it is labeled
|
||||
@key{ALT} or @key{EDIT}; on a Sun keyboard, it may have a diamond on
|
||||
it.
|
||||
characters by holding this key down. Thus, you can type @kbd{Meta-a}
|
||||
by holding down @key{META} and pressing @kbd{a}. The @key{META} key
|
||||
works much like the @key{SHIFT} key. In fact, this key is more often
|
||||
labeled @key{ALT} or @key{EDIT}, instead of @key{META}; on a Sun
|
||||
keyboard, it may have a diamond on it.
|
||||
|
||||
If there is no @key{META} key, you can still type Meta characters
|
||||
using two-character sequences starting with @key{ESC}. Thus, you can
|
||||
@ -90,16 +86,16 @@ you press it and release it, then you enter the next character.
|
||||
@key{ESC} is allowed on terminals with @key{META} keys, too, in case
|
||||
you have formed a habit of using it.
|
||||
|
||||
The X Window System provides several other modifier keys that can be
|
||||
applied to any input character. These are called @key{SUPER},
|
||||
@key{HYPER} and @key{ALT}. We write @samp{s-}, @samp{H-} and @samp{A-}
|
||||
to say that a character uses these modifiers. Thus, @kbd{s-H-C-x} is
|
||||
short for @kbd{Super-Hyper-Control-x}. Not all X terminals actually
|
||||
Emacs defines several other modifier keys that can be applied to any
|
||||
input character. These are called @key{SUPER}, @key{HYPER} and
|
||||
@key{ALT}. We write @samp{s-}, @samp{H-} and @samp{A-} to say that a
|
||||
character uses these modifiers. Thus, @kbd{s-H-C-x} is short for
|
||||
@kbd{Super-Hyper-Control-x}. Not all graphical terminals actually
|
||||
provide keys for these modifier flags---in fact, many terminals have a
|
||||
key labeled @key{ALT} which is really a @key{META} key. The standard
|
||||
key bindings of Emacs do not include any characters with these
|
||||
modifiers. But you can assign them meanings of your own by customizing
|
||||
Emacs.
|
||||
modifiers. But you can assign them meanings of your own by
|
||||
customizing Emacs.
|
||||
|
||||
If your keyboard lacks one of these modifier keys, you can enter it
|
||||
using @kbd{C-x @@}: @kbd{C-x @@ h} adds the ``hyper'' flag to the next
|
||||
@ -109,18 +105,18 @@ enter @kbd{Hyper-Control-a}. (Unfortunately there is no way to add
|
||||
two modifiers by using @kbd{C-x @@} twice for the same character,
|
||||
because the first one goes to work on the @kbd{C-x}.)
|
||||
|
||||
Keyboard input includes keyboard keys that are not characters at all:
|
||||
for example function keys and arrow keys. Mouse buttons are also
|
||||
outside the gamut of characters. You can modify these events with the
|
||||
modifier keys @key{CTRL}, @key{META}, @key{SUPER}, @key{HYPER} and
|
||||
@key{ALT}, just like keyboard characters.
|
||||
Keyboard input includes keyboard keys that are not characters at
|
||||
all: for example function keys and arrow keys. Mouse buttons are also
|
||||
outside the gamut of characters. However, you can modify these events
|
||||
with the modifier keys @key{CTRL}, @key{META}, @key{SUPER},
|
||||
@key{HYPER} and @key{ALT}, just as you can modify keyboard characters.
|
||||
|
||||
@cindex input event
|
||||
Input characters and non-character inputs are collectively called
|
||||
@dfn{input events}. @xref{Input Events,,, elisp, The Emacs Lisp
|
||||
Reference Manual}, for more information. If you are not doing Lisp
|
||||
programming, but simply want to redefine the meaning of some characters
|
||||
or non-character events, see @ref{Customization}.
|
||||
Reference Manual}, for the full Lisp-level details. If you are not
|
||||
doing Lisp programming, but simply want to redefine the meaning of
|
||||
some characters or non-character events, see @ref{Customization}.
|
||||
|
||||
@acronym{ASCII} terminals cannot really send anything to the computer except
|
||||
@acronym{ASCII} characters. These terminals use a sequence of characters to
|
||||
@ -170,12 +166,12 @@ key sequences, not one.@refill
|
||||
|
||||
All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h},
|
||||
@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x
|
||||
n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x 6},
|
||||
@key{ESC}, @kbd{M-o} and @kbd{M-g}. (@key{F1} and @key{F2} are aliases for
|
||||
@kbd{C-h} and @kbd{C-x 6}.) But this list is not cast in concrete; it
|
||||
is just a matter of Emacs's standard key bindings. If you customize
|
||||
Emacs, you can make new prefix keys, or eliminate these. @xref{Key
|
||||
Bindings}.
|
||||
n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x
|
||||
6}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are
|
||||
aliases for @kbd{C-h} and @kbd{C-x 6}.) But this list is not cast in
|
||||
concrete; it is just a matter of Emacs's standard key bindings. If
|
||||
you customize Emacs, you can make new prefix keys, or eliminate some
|
||||
of the standard ones. @xref{Key Bindings}.
|
||||
|
||||
If you do make or eliminate prefix keys, that changes the set of
|
||||
possible key sequences. For example, if you redefine @kbd{C-f} as a
|
||||
@ -184,12 +180,11 @@ define that too as a prefix). Conversely, if you remove the prefix
|
||||
definition of @kbd{C-x 4}, then @kbd{C-x 4 f} (or @kbd{C-x 4
|
||||
@var{anything}}) is no longer a key.
|
||||
|
||||
Typing the help character (@kbd{C-h} or @key{F1}) after a prefix
|
||||
key displays a list of the commands starting with that prefix.
|
||||
There are a few prefix keys for which @kbd{C-h} does not
|
||||
work---for historical reasons, they have other meanings for @kbd{C-h}
|
||||
which are not easy to change. But @key{F1} should work for all prefix
|
||||
keys.
|
||||
Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key
|
||||
displays a list of the commands starting with that prefix. There are
|
||||
a few prefix keys for which @kbd{C-h} does not work---for historical
|
||||
reasons, they define other meanings for @kbd{C-h} which are painful to
|
||||
change. But @key{F1} should work for all prefix keys.
|
||||
|
||||
@node Commands, Text Characters, Keys, Top
|
||||
@section Keys and Commands
|
||||
|
Loading…
Reference in New Issue
Block a user