diff options
Diffstat (limited to 'specs/appB.xml')
| -rw-r--r-- | specs/appB.xml | 1122 |
1 files changed, 296 insertions, 826 deletions
diff --git a/specs/appB.xml b/specs/appB.xml index a1da6ff..cd250ca 100644 --- a/specs/appB.xml +++ b/specs/appB.xml @@ -1,155 +1,91 @@ -<!-- .\" $Xorg: appB,v 1.3 2000/08/17 19:42:48 cpqbld Exp $ --> -<!-- .\" Copyright \(co 1985, 1986, 1987, 1988, 1991, 1994 --> -<!-- .\" X Consortium --> -<!-- .\" --> -<!-- .\" Permission is hereby granted, free of charge, to any person obtaining --> -<!-- .\" a copy of this software and associated documentation files (the --> -<!-- .\" "Software"), to deal in the Software without restriction, including --> -<!-- .\" without limitation the rights to use, copy, modify, merge, publish, --> -<!-- .\" distribute, sublicense, and/or sell copies of the Software, and to --> -<!-- .\" permit persons to whom the Software is furnished to do so, subject to --> -<!-- .\" the following conditions: --> -<!-- .\" --> -<!-- .\" The above copyright notice and this permission notice shall be included --> -<!-- .\" in all copies or substantial portions of the Software. --> -<!-- .\" --> -<!-- .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --> -<!-- .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --> -<!-- .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --> -<!-- .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR --> -<!-- .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, --> -<!-- .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR --> -<!-- .\" OTHER DEALINGS IN THE SOFTWARE. --> -<!-- .\" --> -<!-- .\" Except as contained in this notice, the name of the X Consortium shall --> -<!-- .\" not be used in advertising or otherwise to promote the sale, use or --> -<!-- .\" other dealings in this Software without prior written authorization --> -<!-- .\" from the X Consortium. --> -<!-- .\" --> -<!-- .\" Copyright \(co 1985, 1986, 1987, 1988, 1991, 1994 --> -<!-- .\" Digital Equipment Corporation, Maynard, Massachusetts. --> -<!-- .\" --> -<!-- .\" Permission to use, copy, modify and distribute this documentation for any --> -<!-- .\" purpose and without fee is hereby granted, provided that the above copyright --> -<!-- .\" notice appears in all copies and that both that copyright notice and this --> -<!-- .\" permission notice appear in supporting documentation, and that the name of --> -<!-- .\" Digital not be used in in advertising or publicity pertaining --> -<!-- .\" to distribution of the software without specific, written prior permission. --> -<!-- .\" Digital makes no representations about the suitability of the --> -<!-- .\" software described herein for any purpose. --> -<!-- .\" It is provided ``as is'' without express or implied warranty. --> -<!-- .\" --> -<!-- .bp --> -\& -<!-- .sp 1 --> -<!-- .ce 3 --> -\s+1<function>Appendix B</function>\s-1 +<appendix id='Translation_Table_Syntax'> +<title>Translation Table Syntax</title> +<para><emphasis role='bold'>Notation</emphasis></para> -\s+1<function>Translation Table Syntax</function>\s-1 -<!-- .sp 2 --> <para> -<!-- .LP --> -<!-- .XS --> -<!-- <function>Appendix B \(em Translation Table Syntax</function> --> -<!-- .XE --> -<!-- .IN "Translation tables" --> -<!-- .SH --> -Notation -</para> -<para> -<!-- .LP --> Syntax is specified in EBNF notation with the following conventions: +</para> + <informaltable> - <tgroup cols='3' align='center'> + <tgroup cols='2' align='left'> <colspec colname='c1'/> <colspec colname='c2'/> - <colspec colname='c3'/> <tbody> <row> - <entry>l l.</entry> - </row> - <row> <entry>[ a ]</entry> - <entry>Means either nothing or ``a''</entry> + <entry>Means either nothing or "a"</entry> </row> <row> <entry>{ a }</entry> - <entry>Means zero or more occurrences of ``a''</entry> + <entry>Means zero or more occurrences of "a"</entry> </row> <row> <entry>( a | b )</entry> - <entry>Means either ``a'' or ``b''</entry> + <entry>Means either "a" or "b"</entry> </row> <row> - <entry>\\\\n</entry> + <entry>\\n</entry> <entry>Is the newline character</entry> </row> </tbody> </tgroup> </informaltable> -</para> + <para> -<!-- .LP --> -All terminals are enclosed in double quotation marks (`` ''). +All terminals are enclosed in double quotation marks (" "). Informal descriptions are enclosed in angle brackets (< >). -<!-- .SH --> Syntax </para> -<para> -<!-- .LP --> -The syntax of a translation table is + +<para>The syntax of a translation table is</para> <informaltable> - <tgroup cols='3' align='center'> + <tgroup cols='2' align='left'> <colspec colname='c1'/> <colspec colname='c2'/> - <colspec colname='c3'/> <tbody> <row> - <entry>l l .</entry> - </row> - <row> <entry>translationTable</entry> <entry>= [ directive ] { production }</entry> </row> <row> <entry>directive</entry> - <entry>= ( ``#replace'' | ``#override'' | ``#augment'' ) ``\\\\n''</entry> + <entry>= ( "#replace" | "#override" | "#augment" ) "\\\\n"</entry> </row> <row> <entry>production</entry> - <entry>= lhs ``:'' rhs ``\\\\n''</entry> + <entry>= lhs ":" rhs "\\\\n"</entry> </row> <row> <entry>lhs</entry> - <entry>= ( event | keyseq ) { ``,'' (event | keyseq) }</entry> + <entry>= ( event | keyseq ) { "," (event | keyseq) }</entry> </row> <row> <entry>keyseq</entry> - <entry>= ``"'' keychar {keychar} ``"''</entry> + <entry>= """ keychar {keychar} """</entry> </row> <row> <entry>keychar</entry> - <entry>= [ ``^'' | ``$'' | ``\\\\'' ] <ISO Latin 1 character></entry> + <entry>= [ "^" | "$" | "\\\\" ] <ISO Latin 1 character></entry> </row> <row> <entry>event</entry> - <entry>= [modifier_list] ``<''event_type``>'' [ ``('' count[``+''] ``)'' ] {detail}</entry> + <entry>= [modifier_list] "<"event_type">" [ "(" count["+"] ")" ] {detail}</entry> </row> <row> <entry>modifier_list</entry> - <entry>= ( [``!''] [``:''] {modifier} ) | ``None''</entry> + <entry>= ( ["!"] [":"] {modifier} ) | "None"</entry> </row> <row> <entry>modifier</entry> - <entry>= [``~''] modifier_name</entry> + <entry>= ["~"] modifier_name</entry> </row> <row> <entry>count</entry> - <entry>= (``1'' | ``2'' | ``3'' | ``4'' | ...)</entry> + <entry>= ("1" | "2" | "3" | "4" | ...)</entry> </row> <row> <entry>modifier_name</entry> - <entry>= ``@'' <keysym> | <see ModifierNames table below></entry> + <entry>= "@" <keysym> | <see ModifierNames table below></entry> </row> <row> <entry>event_type</entry> @@ -161,7 +97,7 @@ The syntax of a translation table is </row> <row> <entry>rhs</entry> - <entry>= { name ``('' [params] ``)'' }</entry> + <entry>= { name "(" [params] ")" }</entry> </row> <row> <entry>name</entry> @@ -169,11 +105,11 @@ The syntax of a translation table is </row> <row> <entry>namechar</entry> - <entry>= { ``a''-``z'' | ``A''-``Z'' | ``0''-``9'' | ``_'' | ``-'' }</entry> + <entry>= { "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-" }</entry> </row> <row> <entry>params</entry> - <entry>= string {``,'' string}</entry> + <entry>= string {"," string}</entry> </row> <row> <entry>string</entry> @@ -181,91 +117,114 @@ The syntax of a translation table is </row> <row> <entry>quoted_string</entry> - <entry>= ``"'' {<Latin 1 character> | escape_char} [``\\\\\\\\'' ] ``"''</entry> + <entry>= """ {<Latin 1 character> | escape_char} ["\\\\\\\\" ] """</entry> </row> <row> <entry>escape_char</entry> - <entry>= ``\\\\"''</entry> + <entry>= "\\\\""</entry> </row> <row> <entry>unquoted_string</entry> - <entry>= {<Latin 1 character except space, tab, ``,'', ``\\\\n'', ``)''>}</entry> + <entry>= {<Latin 1 character except space, tab, ",", "\\\\n", ")">}</entry> </row> </tbody> </tgroup> </informaltable> -</para> <para> -<!-- .LP --> The <emphasis remap='I'>params</emphasis> field is parsed into a list of <function>String</function> values that will be passed to the named action procedure. A <emphasis remap='I'>quoted string</emphasis> may contain an embedded quotation mark if the quotation mark is preceded by a single backslash (\\). The -three-character sequence ``\\\\"'' is interpreted as ``single backslash -followed by end-of-string''. - -<!-- .SH --> -Modifier Names +three-character sequence "\\\\"" is interpreted as "single backslash +followed by end-of-string". </para> +<para><emphasis role='bold'>Modifier Names</emphasis></para> + <para> -<!-- .LP --> The modifier field is used to specify standard X keyboard and button modifier mask bits. Modifiers are legal on event types -<function>KeyPress ,</function> -<function>KeyRelease ,</function> -<function>ButtonPress ,</function> -<function>ButtonRelease ,</function> -<function>MotionNotify ,</function> -<function>EnterNotify ,</function> -<function>LeaveNotify ,</function> +<function>KeyPress</function>, +<function>KeyRelease</function>, +<function>ButtonPress</function>, +<function>ButtonRelease</function>, +<function>MotionNotify</function>, +<function>EnterNotify</function>, +<function>LeaveNotify</function>, and their abbreviations. An error is generated when a translation table that contains modifiers for any other events is parsed. </para> -<!-- .IP \(bu 5 --> -If the modifier list has no entries and is not ``None'', -it means ``don't care'' on all modifiers. -<!-- .IP \(bu 5 --> + +<itemizedlist> + <listitem> + <para> +If the modifier list has no entries and is not "None", +it means "don't care" on all modifiers. + </para> + </listitem> + <listitem> + <para> If an exclamation point (!) is specified at the beginning of the modifier list, it means that the listed modifiers must be in the correct state and no other modifiers can be asserted. -<!-- .IP \(bu 5 --> + </para> + </listitem> + <listitem> + <para> If any modifiers are specified and an exclamation point (!) is not specified, it means that the listed modifiers must be in the -correct state and ``don't care'' about any other modifiers. -<!-- .IP \(bu 5 --> +correct state and "don't care" about any other modifiers. + </para> + </listitem> + <listitem> + <para> If a modifier is preceded by a tilde (~), it means that that modifier must not be asserted. -<!-- .IP \(bu 5 --> -If ``None'' is specified, it means no modifiers can be asserted. -<!-- .IP \(bu 5 --> + </para> + </listitem> + <listitem> + <para> +If "None" is specified, it means no modifiers can be asserted. + </para> + </listitem> + <listitem> + <para> If a colon (:) is specified at the beginning of the modifier list, -it directs the (xI to apply any standard modifiers in the +it directs the Intrinsics to apply any standard modifiers in the event to map the event keycode into a KeySym. The default standard modifiers are Shift and Lock, with the interpretation as defined in <emphasis remap='I'>(xP</emphasis>, Section 5. The resulting KeySym must exactly match the specified KeySym, and the nonstandard modifiers in the event must match the modifier list. -For example, ``:<Key>a'' is distinct from ``:<Key>A'', -and ``:Shift<Key>A'' is distinct from ``:<Key>A''. -<!-- .IP \(bu 5 --> +For example, ":<Key>a" is distinct from ":<Key>A", +and ":Shift<Key>A" is distinct from ":<Key>A". + </para> + </listitem> + <listitem> + <para> If both an exclamation point (!) and a colon (:) are specified at the beginning of the modifier list, it means that the listed modifiers must be in the correct state and that no other modifiers except the standard modifiers can be asserted. Any standard modifiers in the event are applied as for colon (:) above. -<!-- .IP \(bu 5 --> + </para> + </listitem> + <listitem> + <para> If a colon (:) is not specified, no standard modifiers are applied. -Then, for example, ``<Key>A'' and ``<Key>a'' are equivalent. +Then, for example, "<Key>A" and "<Key>a" are equivalent. + </para> + </listitem> +</itemizedlist> + <para> -<!-- .LP --> In key sequences, a circumflex (^) is an abbreviation for the Control modifier, a dollar sign ($) is an abbreviation for Meta, @@ -274,45 +233,31 @@ character, in particular a double quote ("), a circumflex (^), a dollar sign ($), and another backslash (\\). Briefly: </para> -<para> -<!-- .LP --> + <literallayout class="monospaced"> -<!-- .TA 2.5i --> -<!-- .ta 2.5i --> -No modifiers: None <event> detail -Any modifiers: <event> detail -Only these modifiers: ! mod1 mod2 <event> detail +No modifiers: None <event> detail +Any modifiers: <event> detail +Only these modifiers: ! mod1 mod2 <event> detail These modifiers and any others: mod1 mod2 <event> detail </literallayout> -</para> + <para> -<!-- .LP --> -The use of ``None'' for a modifier list is identical to the use +The use of "None" for a modifier list is identical to the use of an exclamation point with no modifers. </para> -<para> -<!-- .LP --> + <informaltable> - <tgroup cols='3' align='center'> + <tgroup cols='3' align='left'> <colspec colname='c1'/> <colspec colname='c2'/> <colspec colname='c3'/> <tbody> <row> - <entry>lw(1i) lw(1i) lw(3i).</entry> - </row> - <row> - <entry>_</entry> - </row> - <row> <entry>Modifier</entry> <entry>Abbreviation</entry> <entry>Meaning</entry> </row> <row> - <entry>_</entry> - </row> - <row> <entry>Ctrl</entry> <entry>c</entry> <entry>Control modifier bit</entry> @@ -407,20 +352,15 @@ of an exclamation point with no modifers. <entry></entry> <entry>Any modifier combination</entry> </row> - <row> - <entry>_</entry> - </row> </tbody> </tgroup> </informaltable> -</para> + <para> -<!-- .LP --> -<!-- .IN "key modifier" --> A key modifier is any modifier bit one of whose corresponding KeyCodes contains the corresponding left or right KeySym. For example, -``m'' or ``Meta'' means any modifier bit mapping to a KeyCode +"m" or "Meta" means any modifier bit mapping to a KeyCode whose KeySym list contains XK_Meta_L or XK_Meta_R. Note that this interpretation is for each display, not global or even for each application context. @@ -428,1138 +368,699 @@ The Control, Shift, and Lock modifier names refer explicitly to the corresponding modifier bits; there is no additional interpretation of KeySyms for these modifiers. </para> + <para> -<!-- .LP --> Because it is possible to associate arbitrary KeySyms with modifiers, the set of -key modifiers is extensible. The ``@'' <keysym> syntax means any +key modifiers is extensible. The "@" <keysym> syntax means any modifier bit whose corresponding KeyCode contains the specified KeySym name. </para> + <para> -<!-- .LP --> A modifier_list/KeySym combination in a translation matches a modifiers/KeyCode combination in an event in the following ways: </para> -<itemizedlist> + +<orderedlist> <listitem> <para> -If a colon (:) is used, the (xI call the display's +If a colon (:) is used, the Intrinsics call the display's <function>XtKeyProc</function> with the KeyCode and modifiers. -To match, (<emphasis remap='I'>modifiers</emphasis> & ~<emphasis remap='I'>modifiers_return</emphasis>) must equal <emphasis remap='I'>modifier_list</emphasis>, and +To match, (<emphasis remap='I'>modifiers</emphasis> & ~<emphasis remap='I'>modifiers_return</emphasis>) must equal <emphasis remap='I'>modifier_list</emphasis>, and <emphasis remap='I'>keysym_return</emphasis> must equal the given KeySym. </para> </listitem> <listitem> <para> -If (:) is not used, the (xI mask off all don't-care bits from the +If (:) is not used, the Intrinsics mask off all don't-care bits from the modifiers. This value must be equal to <emphasis remap='I'>modifier_list</emphasis>. Then, for each possible combination of -don't-care modifiers in the modifier list, the (xI call the display's +don't-care modifiers in the modifier list, the Intrinsics call the display's <function>XtKeyProc</function> with the KeyCode and that combination ORed with the cared-about modifier bits from the event. <emphasis remap='I'>Keysym_return</emphasis> must match the KeySym in the translation. -<!-- .SH --> -Event Types </para> </listitem> -</itemizedlist> +</orderedlist> + +<para><emphasis role='bold'>Event Types</emphasis></para> + <para> -<!-- .LP --> The event-type field describes XEvent types. In addition to the standard Xlib symbolic event type names, the following event type synonyms are defined: +</para> + <informaltable> <tgroup cols='2' align='center'> <colspec colname='c1'/> <colspec colname='c2'/> <tbody> <row> - <entry>lw(1.5i) lw(3i).</entry> - </row> - <row> - <entry>_</entry> - </row> - <row> <entry>Type</entry> <entry>Meaning</entry> </row> <row> - <entry>_</entry> - </row> - <row> <entry>Key</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyPress</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>KeyDown</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyPress</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>KeyUp</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyRelease</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>BtnDown</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>BtnUp</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>PtrMoved</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>MouseMoved</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Enter</entry> - <entry>T{</entry> - </row> - <row> <entry><function>EnterNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>EnterWindow</entry> - <entry>T{</entry> - </row> - <row> <entry><function>EnterNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Leave</entry> - <entry>T{</entry> - </row> - <row> <entry><function>LeaveNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>LeaveWindow</entry> - <entry>T{</entry> - </row> - <row> <entry><function>LeaveNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>FocusIn</entry> - <entry>T{</entry> - </row> - <row> <entry><function>FocusIn</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>FocusOut</entry> - <entry>T{</entry> - </row> - <row> <entry><function>FocusOut</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Keymap</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeymapNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Expose</entry> - <entry>T{</entry> - </row> - <row> <entry><function>Expose</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>GrExp</entry> - <entry>T{</entry> - </row> - <row> <entry><function>GraphicsExpose</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>NoExp</entry> - <entry>T{</entry> - </row> - <row> <entry><function>NoExpose</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Visible</entry> - <entry>T{</entry> - </row> - <row> <entry><function>VisibilityNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Create</entry> - <entry>T{</entry> - </row> - <row> <entry><function>CreateNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Destroy</entry> - <entry>T{</entry> - </row> - <row> <entry><function>DestroyNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Unmap</entry> - <entry>T{</entry> - </row> - <row> <entry><function>UnmapNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Map</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MapNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>MapReq</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MapRequest</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Reparent</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ReparentNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Configure</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ConfigureNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>ConfigureReq</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ConfigureRequest</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Grav</entry> - <entry>T{</entry> - </row> - <row> <entry><function>GravityNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>ResReq</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ResizeRequest</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Circ</entry> - <entry>T{</entry> - </row> - <row> <entry><function>CirculateNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>CircReq</entry> - <entry>T{</entry> - </row> - <row> <entry><function>CirculateRequest</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Prop</entry> - <entry>T{</entry> - </row> - <row> <entry><function>PropertyNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>SelClr</entry> - <entry>T{</entry> - </row> - <row> <entry><function>SelectionClear</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>SelReq</entry> - <entry>T{</entry> - </row> - <row> <entry><function>SelectionRequest</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Select</entry> - <entry>T{</entry> - </row> - <row> <entry><function>SelectionNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Clrmap</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ColormapNotify</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Message</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ClientMessage</function></entry> </row> <row> - <entry>T}</entry> - </row> - <row> <entry>Mapping</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MappingNotify</function></entry> </row> - <row> - <entry>T}</entry> - </row> - <row> - <entry>_</entry> - </row> </tbody> </tgroup> </informaltable> -The supported abbreviations are: + +<para>The supported abbreviations are:</para> + <informaltable> - <tgroup cols='3' align='center'> + <tgroup cols='3' align='left'> <colspec colname='c1'/> <colspec colname='c2'/> <colspec colname='c3'/> <tbody> <row> - <entry>lw(1.5i) lw(1.25i) lw(1.75i).</entry> - </row> - <row> - <entry>_</entry> - </row> - <row> <entry>Abbreviation</entry> <entry>Event Type</entry> <entry>Including</entry> </row> <row> - <entry>_</entry> - </row> - <row> <entry>Ctrl</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Control modifier</entry> </row> <row> <entry>Meta</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Meta modifier</entry> </row> <row> <entry>Shift</entry> - <entry>T{</entry> - </row> - <row> <entry><function>KeyPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Shift modifier</entry> </row> <row> <entry>Btn1Down</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button1 detail</entry> </row> <row> <entry>Btn1Up</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button1 detail</entry> </row> <row> <entry>Btn2Down</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button2 detail</entry> </row> <row> <entry>Btn2Up</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button2 detail</entry> </row> <row> <entry>Btn3Down</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button3 detail</entry> </row> <row> <entry>Btn3Up</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button3 detail</entry> </row> <row> <entry>Btn4Down</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button4 detail</entry> </row> <row> <entry>Btn4Up</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button4 detail</entry> </row> <row> <entry>Btn5Down</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonPress</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button5 detail</entry> </row> <row> <entry>Btn5Up</entry> - <entry>T{</entry> - </row> - <row> <entry><function>ButtonRelease</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button5 detail</entry> </row> <row> <entry>BtnMotion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with any button modifier</entry> </row> <row> <entry>Btn1Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button1 modifier</entry> </row> <row> <entry>Btn2Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button2 modifier</entry> </row> <row> <entry>Btn3Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button3 modifier</entry> </row> <row> <entry>Btn4Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button4 modifier</entry> </row> <row> <entry>Btn5Motion</entry> - <entry>T{</entry> - </row> - <row> <entry><function>MotionNotify</function></entry> - </row> - <row> - <entry>T}</entry> <entry>with Button5 modifier</entry> </row> - <row> - <entry>_</entry> - </row> </tbody> </tgroup> </informaltable> -<!-- .sp --> -</para> + <para> -<!-- .LP --> The detail field is event-specific and normally corresponds to the detail field of the corresponding event as described -by <emphasis remap='I'>(xP</emphasis>, Section 11. The detail field is supported -for the following event types: +by <emphasis remap='I'>X Window System Protocol</emphasis>, Section 11. +The detail field is supported for the following event types: </para> -<para> -<!-- .LP --> + <informaltable> - <tgroup cols='' align='center'> + <tgroup cols='2' align='left'> + <colspec colname='c1'/> + <colspec colname='c2'/> <tbody> <row> + <entry>KeyPress</entry> + <entry>KeySym from event <emphasis>detail</emphasis> (keycode)</entry> </row> <row> + <entry>KeyRelease</entry> + <entry>KeySym from event <emphasis>detail</emphasis> (keycode)</entry> </row> <row> + <entry>ButtonPress</entry> + <entry>button from event <emphasis>detail</emphasis></entry> </row> <row> + <entry>ButtonRelease</entry> + <entry>button from event <emphasis>detail</emphasis></entry> </row> <row> + <entry>MotionNotify</entry> + <entry>event <emphasis>detail</emphasis></entry> </row> <row> + <entry>EnterNotify</entry> + <entry>event <emphasis>mode</emphasis></entry> </row> <row> + <entry>LeaveNotify</entry> + <entry>event <emphasis>mode</emphasis></entry> </row> <row> + <entry>FocusIn</entry> + <entry>event <emphasis>mode</emphasis></entry> </row> <row> + <entry>FocusOut</entry> + <entry>event <emphasis>mode</emphasis></entry> </row> <row> + <entry>PropertyNotify</entry> + <entry><emphasis>atom</emphasis></entry> </row> <row> + <entry>SelectionClear</entry> + <entry><emphasis>selection</emphasis></entry> </row> <row> + <entry>SelectionRequest</entry> + <entry><emphasis>selection</emphasis></entry> </row> <row> + <entry>SelectionNotify</entry> + <entry><emphasis>selection</emphasis></entry> </row> <row> + <entry>ClientMessage</entry> + <entry><emphasis>type</emphasis></entry> </row> <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> + <entry>MappingNotify</entry> + <entry><emphasis>request</emphasis></entry> </row> </tbody> </tgroup> </informaltable> -</para> + <para> -<!-- .LP --> If the event type is <function>KeyPress</function> or -<function>KeyRelease ,</function> +<function>KeyRelease</function>, the detail field specifies a KeySym name in standard format which is matched against the event as described above, for example, <Key>A. </para> + <para> -<!-- .LP --> For the -<function>PropertyNotify ,</function> -<function>SelectionClear ,</function> -<function>SelectionRequest ,</function> -<function>SelectionNotify ,</function> +<function>PropertyNotify</function>, +<function>SelectionClear</function>, +<function>SelectionRequest</function>, +<function>SelectionNotify</function>, and <function>ClientMessage</function> events the detail field is specified as an atom name; for example, <Message>WM_PROTOCOLS. For the -<function>MotionNotify ,</function> -<function>EnterNotify ,</function> -<function>LeaveNotify ,</function> -<function>FocusIn ,</function> -<function>FocusOut ,</function> +<function>MotionNotify</function>, +<function>EnterNotify</function>, +<function>LeaveNotify</function>, +<function>FocusIn</function>, +<function>FocusOut</function>, and <function>MappingNotify</function> events, either the symbolic constants as defined by <emphasis remap='I'>(xP</emphasis>, Section 11, or the numeric values may be specified. </para> + <para> -<!-- .LP --> If no detail field is specified, then any value in the event detail is accepted as a match. </para> + <para> -<!-- .LP --> A KeySym can be specified as any of the standard KeySym names, -a hexadecimal number prefixed with ``0x'' or ``0X'', -an octal number prefixed with ``0'', or a decimal number. +a hexadecimal number prefixed with "0x" or "0X", +an octal number prefixed with "0", or a decimal number. A KeySym expressed as a single digit is interpreted as the -corresponding Latin 1 KeySym, for example, ``0'' is the KeySym XK_0. +corresponding Latin 1 KeySym, for example, "0" is the KeySym XK_0. Other single character KeySyms are treated as literal constants from Latin 1, -for example, ``!'' is treated as 0x21. +for example, "!" is treated as 0x21. Standard KeySym names are as defined in <function>< X11/keysymdef.h ></function> -with the ``XK_'' prefix removed. -</para> -<para> -<!-- .LP --> -<!-- .SH --> -Canonical Representation +with the "XK_" prefix removed. </para> + +<para><emphasis role='bold'>Canonical Representation</emphasis></para> + <para> -<!-- .LP --> Every translation table has a unique, canonical text representation. This representation is passed to a widget's <function>display_accelerator</function> procedure to describe the accelerators installed on that widget. The canonical representation of a translation table is (see also -``Syntax'') +"Syntax") +</para> + <informaltable> - <tgroup cols='' align='center'> + <tgroup cols='2' align='left'> + <colspec colname='c1'/> + <colspec colname='c2'/> <tbody> <row> + <entry>translationTable</entry> + <entry>= { production } + </entry> </row> <row> + <entry>production</entry> + <entry>= lhs ":" rhs "\\n" + </entry> </row> <row> + <entry>lhs</entry> + <entry>=event { "," event } + </entry> </row> <row> + <entry>event</entry> + <entry>=[modifier_list] "<"event_type">" [ "(" count["+"] ")" ] {detail} + </entry> </row> <row> + <entry>modifier_list</entry> + <entry>= ["!"] [":"] {modifier} + </entry> </row> <row> + <entry>modifier</entry> + <entry>= ["˜"] modifier_name + </entry> </row> <row> + <entry>count</entry> + <entry>=("1" | "2" | "3" | "4" | ...) + </entry> </row> <row> + <entry>modifier_name</entry> + <entry>= "@" <keysym> | <see canonical modifier names below> + </entry> </row> <row> + <entry>event_type</entry> + <entry>= <see canonical event types below> + </entry> </row> <row> + <entry>detail</entry> + <entry>=<event-specific details> + </entry> </row> <row> + <entry>rhs</entry> + <entry>={ name "(" [params] ")" } + </entry> </row> <row> + <entry>name</entry> + <entry>=namechar { namechar } + </entry> </row> <row> + <entry>namechar</entry> + <entry>= { "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-" } + </entry> </row> <row> + <entry>params</entry> + <entry>=string {"," string} + </entry> </row> <row> + <entry>string</entry> + <entry>=quoted_string + </entry> </row> <row> + <entry>quoted_string</entry> + <entry>= """ {<Latin 1 character> | escape_char} ["\\\\" ] """ + </entry> </row> <row> - </row> - <row> + <entry>escape_char</entry> + <entry>= "\\"" + </entry> </row> </tbody> </tgroup> </informaltable> -</para> -<para> -<!-- .LP --> -The canonical modifier names are -</para> -<para> -<!-- .LP --> + +<para>The canonical modifier names are</para> + <literallayout class="monospaced"> -<!-- .TA 1i 2.5i --> -<!-- .ta 1i 2.5i --> -Ctrl Mod1 Button1 -Shift Mod2 Button2 -Lock Mod3 Button3 - Mod4 Button4 - Mod5 Button5 + Ctrl Mod1 Button1 + Shift Mod2 Button2 + Lock Mod3 Button3 + Mod4 Button4 + Mod5 Button5 </literallayout> -</para> -<para> -<!-- .LP --> -The canonical event types are -</para> -<itemizedlist> - <listitem> - <para> + +<para>The canonical event types are</para> + <informaltable> - <tgroup cols='' align='center'> + <tgroup cols='2' align='left'> + <colspec colname='c1'/> + <colspec colname='c2'/> <tbody> <row> + <entry>KeyPress</entry> + <entry>KeyRelease</entry> </row> <row> + <entry>ButtonPress</entry> + <entry>ButtonRelease</entry> </row> <row> + <entry>MotionNotify</entry> + <entry>EnterNotify</entry> </row> <row> + <entry>LeaveNotify</entry> + <entry>FocusIn</entry> </row> <row> + <entry>FocusOut</entry> + <entry>KeymapNotify</entry> </row> <row> + <entry>Expose</entry> + <entry>GraphicsExpose,</entry> </row> <row> + <entry>NoExpose</entry> + <entry>VisibilityNotify</entry> </row> <row> + <entry>CreateNotify</entry> + <entry>DestroyNotify</entry> </row> <row> + <entry>UnmapNotify</entry> + <entry>MapNotify</entry> </row> <row> + <entry>MapRequest</entry> + <entry>ReparentNotify</entry> </row> <row> + <entry>ConfigureNotify</entry> + <entry>ConfigureRequest</entry> </row> <row> + <entry>GravityNotify</entry> + <entry>ResizeRequest</entry> </row> <row> + <entry>CirculateNotify</entry> + <entry>CirculateRequest</entry> </row> <row> + <entry>PropertyNotify</entry> + <entry>SelectionClear</entry> </row> <row> + <entry>SelectionRequest</entry> + <entry>SelectionNotify</entry> </row> <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> - </row> - <row> + <entry>ColormapNotify</entry> + <entry>ClientMessage</entry> </row> </tbody> </tgroup> </informaltable> - </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<!-- .SH --> -Examples -</para> -<para> -<!-- .LP --> -</para> +<para><emphasis role='bold'>Examples</emphasis></para> + <itemizedlist> <listitem> <para> Always put more specific events in the table before more general ones: </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> <literallayout class="monospaced"> -Shift <Btn1Down> : twas()\\n\\ -<Btn1Down> : brillig() + Shift <Btn1Down> : twas()\\n\\ + <Btn1Down> : brillig() </literallayout> -</para> -<para> -<!-- .LP --> -</para> -<itemizedlist> + </listitem> <listitem> <para> For double-click on Button1 Up with Shift, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift<Btn1Up>(2) : and() </literallayout> - </para> </listitem> <listitem> <para> This is equivalent to the following line with appropriate timers set between events: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>,Shift<Btn1Up> : and() </literallayout> - </para> </listitem> <listitem> <para> For double-click on Button1 Down with Shift, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift<Btn1Down>(2) : the() </literallayout> - </para> </listitem> <listitem> <para> This is equivalent to the following line with appropriate timers set between events: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the() </literallayout> - </para> </listitem> <listitem> <para> Mouse motion is always discarded when it occurs between events in a table where no motion event is specified: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> <Btn1Down>,<Btn1Up> : slithy() </literallayout> - </para> - </listitem> - <listitem> <para> This is taken, even if the pointer moves a bit between the down and up events. @@ -1576,16 +1077,10 @@ noninitial subsequence of another translation, it is not taken if it occurs in the context of the longer sequence. This occurs mostly in sequences like the following: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> <Btn1Down>,<Btn1Up> : toves()\\n\\ <Btn1Up> : did() </literallayout> - </para> - </listitem> - <listitem> <para> The second translation is taken only if the button release is not preceded by a button press or if there are intervening events between the @@ -1606,11 +1101,9 @@ For single click on Button1 Up with Shift and Meta, use this specification: </para> </listitem> <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift Meta <Btn1Down>, Shift Meta<Btn1Up>: gyre() </literallayout> - </para> </listitem> <listitem> <para> @@ -1620,13 +1113,9 @@ count in an event sequence. The actions will be invoked on the <emphasis remap='I'>count</emphasis>-th click and each subsequent one arriving within the multi-click time interval. For example: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Shift <Btn1Up>(2+) : and() </literallayout> - </para> </listitem> <listitem> <para> @@ -1634,13 +1123,9 @@ To indicate <function>EnterNotify</function> with any modifiers, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> <Enter> : gimble() </literallayout> - </para> </listitem> <listitem> <para> @@ -1648,28 +1133,20 @@ To indicate <function>EnterNotify</function> with no modifiers, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> None <Enter> : in() </literallayout> - </para> </listitem> <listitem> <para> To indicate <function>EnterNotify</function> -with Button1 Down and Button2 Up and ``don't care'' about +with Button1 Down and Button2 Up and "don't care" about the other modifiers, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> Button1 ~Button2 <Enter> : the() </literallayout> - </para> </listitem> <listitem> <para> @@ -1677,19 +1154,12 @@ To indicate <function>EnterNotify</function> with Button1 down and Button2 down exclusively, use this specification: </para> - </listitem> - <listitem> - <para> -<literallayout class="monospaced"> + <literallayout class="monospaced"> ! Button1 Button2 <Enter> : wabe() </literallayout> - </para> - </listitem> - <listitem> <para> You do not need to use a tilde (~) with an exclamation point (!). </para> </listitem> </itemizedlist> -</chapter> -</book> +</appendix> |
