Skip to content

Commit 153627c

Browse files
Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2 parents 9ab9694 + 0424eaf commit 153627c

19 files changed

Lines changed: 32 additions & 32 deletions

Doc/faq/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ complete example using the GNU readline library (you may want to ignore
348348
{
349349
line = readline (prompt);
350350

351-
if (NULL == line) /* CTRL-D pressed */
351+
if (NULL == line) /* Ctrl-D pressed */
352352
{
353353
done = 1;
354354
}

Doc/faq/windows.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ by entering a few expressions of your choice and seeing the results::
8181
'HelloHelloHello'
8282

8383
Many people use the interactive mode as a convenient yet highly programmable
84-
calculator. When you want to end your interactive Python session, hold the Ctrl
85-
key down while you enter a Z, then hit the "Enter" key to get back to your
84+
calculator. When you want to end your interactive Python session, hold the :kbd:`Ctrl`
85+
key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your
8686
Windows command prompt.
8787

8888
You may also find that you have a Start-menu entry such as :menuselection:`Start
8989
--> Programs --> Python 3.3 --> Python (command line)` that results in you
9090
seeing the ``>>>`` prompt in a new window. If so, the window will disappear
91-
after you enter the Ctrl-Z character; Windows is running a single "python"
91+
after you enter the :kbd:`Ctrl-Z` character; Windows is running a single "python"
9292
command in the window, and closes it when you terminate the interpreter.
9393

9494
If the ``python`` command, instead of displaying the interpreter prompt ``>>>``,
@@ -131,8 +131,8 @@ you should make sure that entering the command ::
131131

132132
c:\Python33\python
133133

134-
starts up the interpreter as above (and don't forget you'll need a "CTRL-Z" and
135-
an "Enter" to get out of it). Once you have verified the directory, you can
134+
starts up the interpreter as above (and don't forget you'll need a ":kbd:`Ctrl-Z`" and
135+
an ":kbd:`Enter`" to get out of it). Once you have verified the directory, you can
136136
add it to the system path to make it easier to start Python by just running
137137
the ``python`` command. This is currently an option in the installer as of
138138
CPython 3.3.
@@ -327,7 +327,7 @@ Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`::
327327
return (0 != kernel32.TerminateProcess(handle, 0))
328328

329329
In 2.7 and 3.2, :func:`os.kill` is implemented similar to the above function,
330-
with the additional feature of being able to send CTRL+C and CTRL+BREAK
330+
with the additional feature of being able to send :kbd:`Ctrl+C` and :kbd:`Ctrl+Break`
331331
to console subprocesses which are designed to handle those signals. See
332332
:func:`os.kill` for further details.
333333

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ the :meth:`BaseEventLoop.add_signal_handler` method::
853853
loop.add_signal_handler(getattr(signal, signame),
854854
functools.partial(ask_exit, signame))
855855

856-
print("Event loop running forever, press CTRL+c to interrupt.")
856+
print("Event loop running forever, press Ctrl+C to interrupt.")
857857
print("pid %s: send SIGINT or SIGTERM to exit." % os.getpid())
858858
try:
859859
loop.run_forever()

Doc/library/asyncio-protocol.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ received data and close the connection::
539539
coro = loop.create_server(EchoServerClientProtocol, '127.0.0.1', 8888)
540540
server = loop.run_until_complete(coro)
541541

542-
# Serve requests until CTRL+c is pressed
542+
# Serve requests until Ctrl+C is pressed
543543
print('Serving on {}'.format(server.sockets[0].getsockname()))
544544
try:
545545
loop.run_forever()

Doc/library/asyncio-stream.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ TCP echo server using the :func:`asyncio.start_server` function::
312312
coro = asyncio.start_server(handle_echo, '127.0.0.1', 8888, loop=loop)
313313
server = loop.run_until_complete(coro)
314314

315-
# Serve requests until CTRL+c is pressed
315+
# Serve requests until Ctrl+C is pressed
316316
print('Serving on {}'.format(server.sockets[0].getsockname()))
317317
try:
318318
loop.run_forever()

Doc/library/idle.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ Go to file/line
330330
Editing and navigation
331331
----------------------
332332

333-
In this section, 'C' refers to the Control key on Windows and Unix and
334-
the Command key on Mac OSX.
333+
In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix and
334+
the :kbd:`Command` key on Mac OSX.
335335

336336
* :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
337337

Doc/library/multiprocessing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ object -- see :ref:`multiprocessing-managers`.
11741174

11751175
.. note::
11761176

1177-
If the SIGINT signal generated by Ctrl-C arrives while the main thread is
1177+
If the SIGINT signal generated by :kbd:`Ctrl-C` arrives while the main thread is
11781178
blocked by a call to :meth:`BoundedSemaphore.acquire`, :meth:`Lock.acquire`,
11791179
:meth:`RLock.acquire`, :meth:`Semaphore.acquire`, :meth:`Condition.acquire`
11801180
or :meth:`Condition.wait` then the call will be immediately interrupted and

Doc/library/pdb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ access further features, you have to do this yourself:
156156
that matches one of these patterns. [1]_
157157

158158
By default, Pdb sets a handler for the SIGINT signal (which is sent when the
159-
user presses Ctrl-C on the console) when you give a ``continue`` command.
160-
This allows you to break into the debugger again by pressing Ctrl-C. If you
159+
user presses :kbd:`Ctrl-C` on the console) when you give a ``continue`` command.
160+
This allows you to break into the debugger again by pressing :kbd:`Ctrl-C`. If you
161161
want Pdb not to touch the SIGINT handler, set *nosigint* tot true.
162162

163163
Example call to enable tracing with *skip*::

Doc/library/signal.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The variables defined in the :mod:`signal` module are:
105105

106106
.. data:: CTRL_C_EVENT
107107

108-
The signal corresponding to the CTRL+C keystroke event. This signal can
108+
The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal can
109109
only be used with :func:`os.kill`.
110110

111111
Availability: Windows.
@@ -115,7 +115,7 @@ The variables defined in the :mod:`signal` module are:
115115

116116
.. data:: CTRL_BREAK_EVENT
117117

118-
The signal corresponding to the CTRL+BREAK keystroke event. This signal can
118+
The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This signal can
119119
only be used with :func:`os.kill`.
120120

121121
Availability: Windows.

Doc/library/tkinter.ttk.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,9 @@ ttk.Notebook
554554
This will extend the bindings for the toplevel window containing the
555555
notebook as follows:
556556

557-
* Control-Tab: selects the tab following the currently selected one.
558-
* Shift-Control-Tab: selects the tab preceding the currently selected one.
559-
* Alt-K: where K is the mnemonic (underlined) character of any tab, will
557+
* :kbd:`Control-Tab`: selects the tab following the currently selected one.
558+
* :kbd:`Shift-Control-Tab`: selects the tab preceding the currently selected one.
559+
* :kbd:`Alt-K`: where *K* is the mnemonic (underlined) character of any tab, will
560560
select that tab.
561561

562562
Multiple notebooks in a single toplevel may be enabled for traversal,

0 commit comments

Comments
 (0)