11.3 System Defined Logical Key-Events
There are many default logical key-events, some of which are used by functions
documented in this manual. If a command wants to read a single key-event
command that fits one of these descriptions then the key-event read should be
compared to the corresponding logical key-event instead of explicitly
mentioning the particular key-event in the code. In many cases you can use the
command-case macro. It makes logical key-events easy to use and takes
care of prompting and displaying help messages. [annotate]
- :yes
-
Indicates the prompter should take the action under consideration. [annotate]
- :no
-
Indicates the prompter should NOT take the action under consideration. [annotate]
- :do-all
-
Indicates the prompter should repeat the action under consideration as many
times as possible. [annotate]
- :do-once
-
Indicates the prompter should execute the action under consideration once and
then exit. [annotate]
- :exit
-
Indicates the prompter should terminate its activity in a normal fashion. [annotate]
- :abort
-
Indicates the prompter should terminate its activity without performing any
closing actions of convenience, for example. [annotate]
- :keep
-
Indicates the prompter should preserve something. [annotate]
- :help
-
Indicates the prompter should display some help information. [annotate]
- :confirm
-
Indicates the prompter should take any input provided or use the default if
the user entered nothing. [annotate]
- :quote
-
Indicates the prompter should take the following key-event as itself without
any sort of command interpretation. [annotate]
- :recursive-edit
-
Indicates the prompter should enter a recursive edit in the current context. [annotate]
- :cancel
-
Indicates the prompter should cancel the effect of a previous key-event input. [annotate]
- :forward-search
-
Indicates the prompter should search forward in the current context. [annotate]
- :backward-search
-
Indicates the prompter should search backward in the current context.
[annotate]
Define a new logical key-event whenever:
[annotate]
-
The key-event concerned represents a general class of actions, and
several commands may want to take a similar action of this type. [annotate]
- The exact key-event a command implementor chooses may generate violent taste
disputes among users, and then the users can trivially change the command in
their init files. [annotate]
- You are using command-case which prevents implementors from specifying
non-standard characters for dispatching in otherwise possibly portable code,
and you can define and set the logical key-event in a site dependent file where
you can mention implementation dependent characters.
[annotate]