1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

Use <keycap> and <keycombo> DocBook tags (#3904)

Co-authored-by: Jim Winstead <jimw@trainedmonkey.com>
This commit is contained in:
Gina Peter Banyard
2024-10-24 14:08:49 +01:00
committed by GitHub
parent ea61eef42b
commit eee245cdbd
6 changed files with 266 additions and 48 deletions

View File

@@ -15,7 +15,16 @@
<sect2 xml:id="migration74.windows-support.other">
<title>CTRL handling</title>
<para>
CTRL+C and CTRL+BREAK on console can be caught by setting a handler function
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>C</keycap>
</keycombo>
and
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>BREAK</keycap>
</keycombo>
on console can be caught by setting a handler function
with <function>sapi_windows_set_ctrl_handler</function>.
</para>
<para>

View File

@@ -718,7 +718,12 @@
</term>
<listitem>
<simpara>
A Windows <literal>CTRL+C</literal> event.
A Windows
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>C</keycap>
</keycombo>
event.
Available as of PHP 7.4.0 (Windows only).
</simpara>
</listitem>
@@ -730,7 +735,12 @@
</term>
<listitem>
<simpara>
A Windows <literal>CTRL+BREAK</literal> event.
A Windows
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>BREAK</keycap>
</keycombo>
event.
Available as of PHP 7.4.0 (Windows only).
</simpara>
</listitem>

View File

@@ -154,47 +154,96 @@
<tbody>
<row>
<entry>Close the Help Viewer</entry>
<entry>ALT+F4</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>F4</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Display the Options menu</entry>
<entry>ALT+O</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>O</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Hide or show the Navigation pane</entry>
<entry>ALT+O, and then T</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>O</keycap>
</keycombo>,
and then <keycap>T</keycap>
</entry>
</row>
<row>
<entry>Print a topic</entry>
<entry>ALT+O, and then P</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>O</keycap>
</keycombo>,
and then <keycap>P</keycap>
</entry>
</row>
<row>
<entry>Move back to the previous topic</entry>
<entry>ALT+LEFT ARROW</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>LEFT ARROW</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Move forward to the next topic (provided you have viewed it just previously)</entry>
<entry>ALT+RIGHT ARROW</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>RIGHT ARROW</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Turn on or off search highlighting.</entry>
<entry>ALT+O, and then O</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>O</keycap>
</keycombo>,
and then <keycap>O</keycap>
</entry>
</row>
<row>
<entry>Return to the help file home page</entry>
<entry>ALT+O, and then H</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>O</keycap>
</keycombo>,
and then <keycap>H</keycap>
</entry>
</row>
<row>
<entry>Switch between the Navigation pane and the Topic pane</entry>
<entry>F6</entry>
<entry><keycap>F6</keycap></entry>
</row>
<row>
<entry>Scroll through all the links in a topic or through all the options on a Navigation pane tab</entry>
<entry>TAB</entry>
<entry><keycap>TAB</keycap></entry>
</row>
<row>
<entry>Display context (right click) menu</entry>
<entry>SHIFT+F10</entry>
<entry>
<keycombo action='simul'>
<keycap>SHIFT</keycap>
<keycap>F10</keycap>
</keycombo>
</entry>
</row>
</tbody>
</tgroup>
@@ -212,19 +261,29 @@
<tbody>
<row>
<entry>Display the Contents tab</entry>
<entry>ALT+C</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>C</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Open and close a book or folder</entry>
<entry>PLUS SIGN and MINUS SIGN, or LEFT ARROW and RIGHT ARROW</entry>
<entry>
<keycap>+</keycap> and <keycap>-</keycap>
or <keycap>LEFT ARROW</keycap> and <keycap>RIGHT ARROW</keycap>
</entry>
</row>
<row>
<entry>Select a topic</entry>
<entry>DOWN ARROW and UP ARROW</entry>
<entry>
<keycap>DOWN ARROW</keycap> and <keycap>UP ARROW</keycap>
</entry>
</row>
<row>
<entry>Display the selected topic</entry>
<entry>ENTER</entry>
<entry><keycap>ENTER</keycap></entry>
</row>
</tbody>
</tgroup>
@@ -242,19 +301,38 @@
<tbody>
<row>
<entry>Display the Index tab</entry>
<entry>ALT+N</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>N</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Type a keyword to search for</entry>
<entry>ALT+W, and then type the word</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>W</keycap>
</keycombo>,
and then type the word
</entry>
</row>
<row>
<entry>Select a keyword in the list</entry>
<entry>UP ARROW and DOWN ARROW</entry>
<entry>
<keycap>UP ARROW</keycap> and <keycap>DOWN ARROW</keycap>
</entry>
</row>
<row>
<entry>Display the associated topic</entry>
<entry>ENTER or ALT+D</entry>
<entry>
<keycap>ENTER</keycap> or
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>D</keycap>
</keycombo>
</entry>
</row>
</tbody>
</tgroup>
@@ -272,35 +350,82 @@
<tbody>
<row>
<entry>Display the Search tab</entry>
<entry>ALT+S</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>S</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Type a keyword to search for</entry>
<entry>ALT+W, and then type the word</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>W</keycap>
</keycombo>,
and then type the word
</entry>
</row>
<row>
<entry>Start a search</entry>
<entry>ALT+L</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>L</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Select a topic in the results list</entry>
<entry>ALT+T, and then UP ARROW and DOWN ARROW</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>T</keycap>
</keycombo>,
and then
<keycap>UP ARROW</keycap> and <keycap>DOWN ARROW</keycap>
</entry>
</row>
<row>
<entry>Display the selected topic</entry>
<entry>ENTER or ALT+D</entry>
<entry>
<keycap>ENTER</keycap> or
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>D</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Search for a keyword in the result list of a prior search</entry>
<entry>ALT+U</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>U</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Search for words similar to the keyword. For example, to find words like "running" and "runs" for the keyword "run"</entry>
<entry>ALT+M</entry>
<entry>
Search for words similar to the keyword.
For example, to find words like "running" and "runs" for the keyword "run"
</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>M</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Only search through topic titles</entry>
<entry>ALT+R</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>R</keycap>
</keycombo>
</entry>
</row>
</tbody>
</tgroup>
@@ -318,23 +443,51 @@
<tbody>
<row>
<entry>Display the Favorites tab</entry>
<entry>ALT+I</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>I</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Add the currently displayed topic to the Favorites list</entry>
<entry>ALT+A</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>A</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Select a topic in the Favorites list</entry>
<entry>ALT+P, and then UP ARROW and DOWN ARROW</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>P</keycap>
</keycombo>,
and then
<keycap>UP ARROW</keycap> and <keycap>DOWN ARROW</keycap>
</entry>
</row>
<row>
<entry>Display the selected topic</entry>
<entry>ENTER or ALT+D</entry>
<entry>
<keycap>ENTER</keycap> or
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>D</keycap>
</keycombo>
</entry>
</row>
<row>
<entry>Remove the selected topic from the list</entry>
<entry>ALT+R</entry>
<entry>
<keycombo action='simul'>
<keycap>ALT</keycap>
<keycap>R</keycap>
</keycombo>
</entry>
</row>
</tbody>
</tgroup>
@@ -352,15 +505,24 @@
<tbody>
<row>
<entry>Index Lookup</entry>
<entry>Select the words you would like to look up and press F1</entry>
<entry>
Select the words you would like to look up and press
<keycap>F1</keycap>
</entry>
</row>
<row>
<entry>Find on page</entry>
<entry>CTRL+F, and then adjust options</entry>
<entry>
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>F</keycap>
</keycombo>,
and then adjust options
</entry>
</row>
<row>
<entry>Refresh page</entry>
<entry>F5</entry>
<entry><keycap>F5</keycap></entry>
</row>
</tbody>
</tgroup>

View File

@@ -1598,8 +1598,17 @@ php >
If the readline extension is not available, prior to PHP 8.1.0, invoking the &cli.sapi; with the
<option>-a</option> option provided the interactive mode. In this mode, a
complete PHP script is supposed to be given via STDIN, and after termination
with <literal>CRTL+d</literal> (POSIX) or <literal>CTRL+z</literal>
followed by <literal>ENTER</literal> (Windows), this script is evaluated.
with
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>D</keycap>
</keycombo>
(POSIX) or
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>Z</keycap>
</keycombo>
followed by <keycap>ENTER</keycap> (Windows), this script is evaluated.
This is basically the same as invoking the &cli.sapi; without the <option>-a</option>
option.
</para>

View File

@@ -29,8 +29,18 @@
<listitem>
<para>
A callback function to set or remove. If set, this function will be called
whenever a <literal>CTRL+C</literal> or <literal>CTRL+BREAK</literal> event
occurs. The function is supposed to have the following signature:
whenever a
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>C</keycap>
</keycombo>
or
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>BREAK</keycap>
</keycombo>
event occurs.
The function is supposed to have the following signature:
<methodsynopsis>
<type>void</type><methodname>handler</methodname>
<methodparam><type>int</type><parameter>event</parameter></methodparam>
@@ -40,7 +50,7 @@
<term><parameter>event</parameter></term>
<listitem>
<simpara>
The <literal>CTRL</literal> event which has been received;
The <keycap>CTRL</keycap> event which has been received;
either <constant>PHP_WINDOWS_EVENT_CTRL_C</constant>
or <constant>PHP_WINDOWS_EVENT_CTRL_BREAK</constant>.
</simpara>
@@ -48,7 +58,16 @@
</varlistentry>
</variablelist>
Setting a &null; <parameter>handler</parameter> causes the process to ignore
<literal>CTRL+C</literal> events, but not <literal>CTRL+BREAK</literal> events.
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>C</keycap>
</keycombo>
events, but not
<keycombo action='simul'>
<keycap>CTRL</keycap>
<keycap>BREAK</keycap>
</keycombo>
events.
</para>
</listitem>
</varlistentry>

View File

@@ -87,21 +87,30 @@
<varlistentry xml:id="ui-area.constants.ctrl">
<term><constant>UI\Area::Ctrl</constant></term>
<listitem>
<para>Shall be set in the modifiers passed to key and mouse events when the CTRL key is active</para>
<simpara>
Shall be set in the modifiers passed to key and mouse events
when the <keycap>CTRL</keycap> key is active
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ui-area.constants.alt">
<term><constant>UI\Area::Alt</constant></term>
<listitem>
<para>Shall be set in the modifiers passed to key and mouse events when the ALT key is active</para>
<simpara>
Shall be set in the modifiers passed to key and mouse events
when the <keycap>ALT</keycap> key is active
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="ui-area.constants.shift">
<term><constant>UI\Area::Shift</constant></term>
<listitem>
<para>Shall be set in the modifiers passed to key and mouse events when the SHIFT key is active</para>
<simpara>
Shall be set in the modifiers passed to key and mouse events
when the <keycap>SHIFT</keycap> key is active
</simpara>
</listitem>
</varlistentry>