mirror of
https://github.com/python/cpython
synced 2024-10-09 05:19:50 +00:00
Follow the recommended practices for keystroke representation; this
improves internal consistency in the documentation.
This commit is contained in:
parent
07178d237a
commit
682d5f3cda
|
@ -33,10 +33,10 @@ The optional argument is a banner or intro string to be issued before the
|
||||||
first prompt (this overrides the \member{intro} class member).
|
first prompt (this overrides the \member{intro} class member).
|
||||||
|
|
||||||
If the \module{readline} module is loaded, input will automatically
|
If the \module{readline} module is loaded, input will automatically
|
||||||
inherit \program{bash}-like history-list editing (e.g. \kbd{Ctrl-P}
|
inherit \program{bash}-like history-list editing (e.g. \kbd{Control-P}
|
||||||
scrolls back to the last command, \kbd{Ctrl-N} forward to the next
|
scrolls back to the last command, \kbd{Control-N} forward to the next
|
||||||
one, \kbd{Ctrl-F} moves the cursor to the right non-destructively,
|
one, \kbd{Control-F} moves the cursor to the right non-destructively,
|
||||||
\kbd{Ctrl-B} moves the cursor to the left non-destructively, etc.).
|
\kbd{Control-B} moves the cursor to the left non-destructively, etc.).
|
||||||
|
|
||||||
An end-of-file on input is passed back as the string \code{'EOF'}.
|
An end-of-file on input is passed back as the string \code{'EOF'}.
|
||||||
|
|
||||||
|
|
|
@ -1304,20 +1304,22 @@ Process a single command keystroke. Here are the supported special
|
||||||
keystrokes:
|
keystrokes:
|
||||||
|
|
||||||
\begin{tableii}{l|l}{kbd}{Keystroke}{Action}
|
\begin{tableii}{l|l}{kbd}{Keystroke}{Action}
|
||||||
\lineii{Ctrl-A}{Go to left edge of window.}
|
\lineii{Control-A}{Go to left edge of window.}
|
||||||
\lineii{Ctrl-B}{Cursor left, wrapping to previous line if appropriate.}
|
\lineii{Control-B}{Cursor left, wrapping to previous line if appropriate.}
|
||||||
\lineii{Ctrl-D}{Delete character under cursor.}
|
\lineii{Control-D}{Delete character under cursor.}
|
||||||
\lineii{Ctrl-E}{Go to right edge (stripspaces off) or end of line
|
\lineii{Control-E}{Go to right edge (stripspaces off) or end of line
|
||||||
(stripspaces on).}
|
(stripspaces on).}
|
||||||
\lineii{Ctrl-F}{Cursor right, wrapping to next line when appropriate.}
|
\lineii{Control-F}{Cursor right, wrapping to next line when appropriate.}
|
||||||
\lineii{Ctrl-G}{Terminate, returning the window contents.}
|
\lineii{Control-G}{Terminate, returning the window contents.}
|
||||||
\lineii{Ctrl-H}{Delete character backward.}
|
\lineii{Control-H}{Delete character backward.}
|
||||||
\lineii{Ctrl-J}{Terminate if the window is 1 line, otherwise insert newline.}
|
\lineii{Control-J}{Terminate if the window is 1 line, otherwise
|
||||||
\lineii{Ctrl-K}{If line is blank, delete it, otherwise clear to end of line.}
|
insert newline.}
|
||||||
\lineii{Ctrl-L}{Refresh screen.}
|
\lineii{Control-K}{If line is blank, delete it, otherwise clear to
|
||||||
\lineii{Ctrl-N}{Cursor down; move down one line.}
|
end of line.}
|
||||||
\lineii{Ctrl-O}{Insert a blank line at cursor location.}
|
\lineii{Control-L}{Refresh screen.}
|
||||||
\lineii{Ctrl-P}{Cursor up; move up one line.}
|
\lineii{Control-N}{Cursor down; move down one line.}
|
||||||
|
\lineii{Control-O}{Insert a blank line at cursor location.}
|
||||||
|
\lineii{Control-P}{Cursor up; move up one line.}
|
||||||
\end{tableii}
|
\end{tableii}
|
||||||
|
|
||||||
Move operations do nothing if the cursor is at an edge where the
|
Move operations do nothing if the cursor is at an edge where the
|
||||||
|
@ -1325,11 +1327,11 @@ movement is not possible. The following synonyms are supported where
|
||||||
possible:
|
possible:
|
||||||
|
|
||||||
\begin{tableii}{l|l}{constant}{Constant}{Keystroke}
|
\begin{tableii}{l|l}{constant}{Constant}{Keystroke}
|
||||||
\lineii{KEY_LEFT}{\kbd{Ctrl-B}}
|
\lineii{KEY_LEFT}{\kbd{Control-B}}
|
||||||
\lineii{KEY_RIGHT}{\kbd{Ctrl-F}}
|
\lineii{KEY_RIGHT}{\kbd{Control-F}}
|
||||||
\lineii{KEY_UP}{\kbd{Ctrl-P}}
|
\lineii{KEY_UP}{\kbd{Control-P}}
|
||||||
\lineii{KEY_DOWN}{\kbd{Ctrl-N}}
|
\lineii{KEY_DOWN}{\kbd{Control-N}}
|
||||||
\lineii{KEY_BACKSPACE}{\kbd{Ctrl-h}}
|
\lineii{KEY_BACKSPACE}{\kbd{Control-h}}
|
||||||
\end{tableii}
|
\end{tableii}
|
||||||
|
|
||||||
All other keystrokes are treated as a command to insert the given
|
All other keystrokes are treated as a command to insert the given
|
||||||
|
|
|
@ -177,7 +177,7 @@ Raised when an \keyword{assert} statement fails.
|
||||||
|
|
||||||
\begin{excdesc}{KeyboardInterrupt}
|
\begin{excdesc}{KeyboardInterrupt}
|
||||||
Raised when the user hits the interrupt key (normally
|
Raised when the user hits the interrupt key (normally
|
||||||
\kbd{Control-C} or \kbd{DEL}). During execution, a check for
|
\kbd{Control-C} or \kbd{Delete}). During execution, a check for
|
||||||
interrupts is made regularly.
|
interrupts is made regularly.
|
||||||
% XXXJH xrefs here
|
% XXXJH xrefs here
|
||||||
Interrupts typed when a built-in function \function{input()} or
|
Interrupts typed when a built-in function \function{input()} or
|
||||||
|
|
Loading…
Reference in a new issue