home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xt / appB < prev    next >
Encoding:
Text File  |  1991-07-31  |  17.2 KB  |  760 lines

  1. .\" $XConsortium: appB,v 1.5 91/07/31 20:24:53 swick Exp $
  2. .\"
  3. .\" Copyright 1985, 1986, 1987, 1988, 1991
  4. .\" Massachusetts Institute of Technology, Cambridge, Massachusetts,
  5. .\" and Digital Equipment Corporation, Maynard, Massachusetts.
  6. .\"
  7. .\" Permission to use, copy, modify and distribute this documentation for any
  8. .\" purpose and without fee is hereby granted, provided that the above copyright
  9. .\" notice appears in all copies and that both that copyright notice and this
  10. .\" permission notice appear in supporting documentation, and that the name of
  11. .\" M.I.T. or Digital not be used in in advertising or publicity pertaining
  12. .\" to distribution of the software without specific, written prior permission.
  13. .\" M.I.T and Digital makes no representations about the suitability of the
  14. .\" software described herein for any purpose.
  15. .\" It is provided ``as is'' without express or implied warranty.
  16. .bp
  17. \&
  18. .sp 1
  19. .ce 3
  20. \s+1\fBAppendix B\fP\s-1
  21.  
  22. \s+1\fBTranslation Table Syntax\fP\s-1
  23. .sp 2
  24. .LP
  25. .XS
  26. \fBAppendix B \- Translation Table Syntax\fP
  27. .XE
  28. .IN "Translation tables"
  29. .SH
  30. Notation
  31. .LP
  32. Syntax is specified in EBNF notation with the following conventions:
  33. .TS
  34. l l.
  35. [ a ]    Means either nothing or ``a''
  36. { a }    Means zero or more occurrences of ``a''
  37. ( a | b )    Means either ``a'' or ``b''
  38. \\\\n    Is the newline character
  39. .TE
  40. .LP
  41. All terminals are enclosed in double quotation marks (`` '').
  42. Informal descriptions are enclosed in angle brackets (< >).
  43. .SH
  44. Syntax
  45. .LP
  46. The syntax of a translation table is
  47. .TS
  48. l l .
  49. translationTable    = [ directive ] { production }
  50. directive    = ( ``#replace'' | ``#override'' | ``#augment'' ) ``\\\\n''
  51. production    = lhs ``:'' rhs ``\\\\n''
  52. lhs    = ( event | keyseq ) { ``,'' (event | keyseq) }
  53. keyseq    = ``"'' keychar {keychar} ``"''
  54. keychar    = [ ``^'' | ``$'' | ``\\\\'' ] <ISO Latin 1 character>
  55. event    = [modifier_list] ``<''event_type``>'' [ ``('' count[``+''] ``)'' ] {detail}
  56. modifier_list    = ( [``!''] [``:''] {modifier} ) | ``None''
  57. modifier    = [``~''] modifier_name
  58. count    = (``1'' | ``2'' | ``3'' | ``4'' | ...)
  59. modifier_name    = ``@'' <keysym> | <see ModifierNames table below>
  60. event_type    = <see Event Types table below>
  61. detail    = <event specific details>
  62. rhs    = { name ``('' [params] ``)'' }
  63. name    = namechar { namechar }
  64. namechar    = { ``a''-``z'' | ``A''-``Z'' | ``0''-``9'' | ``_'' | ``-'' }
  65. params    = string {``,'' string}
  66. string    = quoted_string | unquoted_string
  67. quoted_string    = ``"'' {<Latin 1 character> | escape_char} [``\\\\\\\\'' ] ``"''
  68. escape_char    = ``\\\\"''
  69. unquoted_string    = {<Latin 1 character except space, tab, ``,'', ``\\\\n'', ``)''>}
  70. .TE
  71.  
  72. .LP
  73. The \fIparams\fP field is parsed into a list of
  74. .PN String
  75. values that will be passed to the named action procedure.  A
  76. \fIquoted string\fP may contain an embedded quotation mark if the
  77. quotation mark is preceded by a single backslash (\\).  The
  78. three-character sequence ``\\\\"'' is interpreted as ``single backslash
  79. followed by end-of-string''.
  80.  
  81. .SH
  82. Modifier Names
  83. .LP
  84. The modifier field is used to specify standard X keyboard and button
  85. modifier mask bits.
  86. Modifiers are legal on event types 
  87. .PN KeyPress ,
  88. .PN KeyRelease , 
  89. .PN ButtonPress ,
  90. .PN ButtonRelease ,
  91. .PN MotionNotify ,
  92. .PN EnterNotify ,
  93. .PN LeaveNotify ,
  94. and their abbreviations.
  95. An error is generated when a translation table 
  96. that contains modifiers for any other events is parsed.
  97. .IP \(bu 5
  98. If the modifier list has no entries and is not ``None'',
  99. it means ``don't care'' on all modifiers.
  100. .IP \(bu 5
  101. If an exclamation point (!) is specified at the beginning 
  102. of the modifier list,
  103. it means that the listed modifiers must be in the correct state
  104. and no other modifiers can be asserted.
  105. .IP \(bu 5
  106. If any modifiers are specified 
  107. and an exclamation point (!) is not specified,
  108. it means that the listed modifiers must be in the
  109. correct state and ``don't care'' about any other modifiers.
  110. .IP \(bu 5
  111. If a modifier is preceded by a tilde (~),
  112. it means that that modifier must not be asserted.
  113. .IP \(bu 5
  114. If ``None'' is specified, it means no modifiers can be asserted.
  115. .IP \(bu 5
  116. If a colon (:) is specified at the beginning of the modifier list,
  117. it directs the \*(xI to apply any standard modifiers in the
  118. event to map the event keycode into a KeySym.
  119. The default standard modifiers are Shift and Lock, 
  120. with the interpretation as defined in \fI\*(xP\fP, Section 5.
  121. The resulting KeySym must exactly match the specified
  122. KeySym, and the nonstandard modifiers in the event must match the
  123. modifier list.
  124. For example, ``:<Key>a'' is distinct from ``:<Key>A'', 
  125. and ``:Shift<Key>A'' is distinct from ``:<Key>A''.
  126. .IP \(bu 5
  127. If both an exclamation point (!) and a colon (:) are specified at
  128. the beginning of the modifier list, it means that the listed
  129. modifiers must be in the correct state and that no other modifiers
  130. except the standard modifiers can be asserted.  Any standard
  131. modifiers in the event are applied as for colon (:) above.
  132. .IP \(bu 5
  133. If a colon (:) is not specified,
  134. no standard modifiers are applied.
  135. Then, for example, ``<Key>A'' and ``<Key>a'' are equivalent.
  136. .LP
  137. In key sequences,
  138. a circumflex (^) is an abbreviation for the Control modifier,
  139. a dollar sign ($) is an abbreviation for Meta, 
  140. and a backslash (\\) can be used to quote any
  141. character, in particular a double quote ("), a circumflex (^), 
  142. a dollar sign ($), and another backslash (\\).
  143. Briefly:
  144. .LP
  145. .Ds 0
  146. .TA 2.5i
  147. .ta 2.5i
  148. No Modifiers:    None <event> detail
  149. Any Modifiers:    <event> detail
  150. Only these Modifiers:    ! mod1 mod2 <event> detail
  151. These modifiers and any others:    mod1 mod2 <event> detail
  152. .LP
  153. The use of ``None'' for a modifier list is identical to the use
  154. of an exclamation point with no modifers.
  155. .De
  156. .TS H
  157. lw(1i) lw(1i) lw(3i).
  158. _
  159. .sp 6p
  160. .TB
  161. Modifier    Abbreviation    Meaning
  162. .sp 6p
  163. _
  164. .sp 6p
  165. .TH
  166. .R
  167. Ctrl    c    Control modifier bit
  168. Shift    s    Shift modifier bit
  169. Lock    l    Lock modifier bit
  170. Meta    m    Meta key modifier
  171. Hyper    h    Hyper key modifier
  172. Super    su    Super key modifier
  173. Alt    a    Alt key modifier
  174. Mod1        Mod1 modifier bit
  175. Mod2        Mod2 modifier bit
  176. Mod3        Mod3 modifier bit
  177. Mod4        Mod4 modifier bit
  178. Mod5        Mod5 modifier bit
  179. Button1        Button1 modifier bit
  180. Button2        Button2 modifier bit
  181. Button3        Button3 modifier bit
  182. Button4        Button4 modifier bit
  183. Button5        Button5 modifier bit
  184. None        No modifiers
  185. Any        Any modifier combination
  186. .sp 6p
  187. _
  188. .TE
  189. .LP
  190. .IN "key modifier"
  191. A key modifier is any modifier bit one of whose corresponding KeyCodes
  192. contains the corresponding left or right KeySym.
  193. For example, 
  194. ``m'' or ``Meta'' means any modifier bit mapping to a KeyCode 
  195. whose KeySym list contains XK_Meta_L or XK_Meta_R.
  196. Note that this interpretation is for each display, 
  197. not global or even for each application context.
  198. The Control, Shift, and Lock modifier names refer
  199. explicitly to the corresponding modifier bits; 
  200. there is no additional interpretation of KeySyms for these modifiers.
  201. .LP
  202. Because it is possible to associate arbitrary KeySyms with modifiers, the set of
  203. key modifiers is extensible.  The ``@'' <keysym> syntax means any
  204. modifier bit whose corresponding KeyCode contains the specified KeySym name.
  205. .LP
  206. A modifier_list/KeySym combination in a translation matches a
  207. modifiers/KeyCode combination in an event in the following ways:
  208. .IP 1. 5
  209. If a colon (:) is used, the \*(xI call the display's 
  210. .PN XtKeyProc 
  211. with the KeyCode and modifiers.
  212. To match, (\fImodifiers\fP & ~\fImodifiers_return\fP) must equal \fImodifier_list\fP, and
  213. \fIkeysym_return\fP must equal the given KeySym.
  214. .IP 2. 5
  215. If (:) is not used, the \*(xI mask off all don't-care bits from the 
  216. modifiers.
  217. This value must be equal to \fImodifier_list\fP.
  218. Then, for each possible combination of
  219. don't-care modifiers in the modifier list, the \*(xI call the display's 
  220. .PN XtKeyProc
  221. with the KeyCode and that combination ORed with the cared-about modifier bits 
  222. from the event.
  223. \fIKeysym_return\fP must match the KeySym in the translation.
  224. .SH
  225. Event Types
  226. .LP
  227. The event-type field describes XEvent types.
  228. In addition to the standard
  229. Xlib symbolic event type names, the following event type synonyms
  230. are defined:
  231. .TS H
  232. lw(1.5i) lw(3i).
  233. _
  234. .sp 6p
  235. .TB
  236. Type    Meaning
  237. .sp 6p
  238. _
  239. .sp 6p
  240. .TH
  241. Key    T{
  242. .PN KeyPress
  243. T}
  244. KeyDown    T{
  245. .PN KeyPress
  246. T}
  247. KeyUp    T{
  248. .PN KeyRelease
  249. T}
  250. BtnDown    T{
  251. .PN ButtonPress
  252. T}
  253. BtnUp    T{
  254. .PN ButtonRelease
  255. T}
  256. Motion    T{
  257. .PN MotionNotify
  258. T}
  259. PtrMoved    T{
  260. .PN MotionNotify
  261. T}
  262. MouseMoved    T{
  263. .PN MotionNotify
  264. T}
  265. Enter    T{
  266. .PN EnterNotify
  267. T}
  268. EnterWindow    T{
  269. .PN EnterNotify
  270. T}
  271. Leave    T{
  272. .PN LeaveNotify
  273. T}
  274. LeaveWindow    T{
  275. .PN LeaveNotify
  276. T}
  277. FocusIn    T{
  278. .PN FocusIn
  279. T}
  280. FocusOut    T{
  281. .PN FocusOut
  282. T}
  283. Keymap    T{
  284. .PN KeymapNotify
  285. T}
  286. Expose    T{
  287. .PN Expose
  288. T}
  289. GrExp    T{
  290. .PN GraphicsExpose
  291. T}
  292. NoExp    T{
  293. .PN NoExpose
  294. T}
  295. Visible    T{
  296. .PN VisibilityNotify
  297. T}
  298. Create    T{
  299. .PN CreateNotify
  300. T}
  301. Destroy    T{
  302. .PN DestroyNotify
  303. T}
  304. Unmap    T{
  305. .PN UnmapNotify
  306. T}
  307. Map    T{
  308. .PN MapNotify
  309. T}
  310. MapReq    T{
  311. .PN MapRequest
  312. T}
  313. Reparent    T{
  314. .PN ReparentNotify
  315. T}
  316. Configure    T{
  317. .PN ConfigureNotify
  318. T}
  319. ConfigureReq    T{
  320. .PN ConfigureRequest
  321. T}
  322. Grav    T{
  323. .PN GravityNotify
  324. T}
  325. ResReq    T{
  326. .PN ResizeRequest
  327. T}
  328. Circ    T{
  329. .PN CirculateNotify
  330. T}
  331. CircReq    T{
  332. .PN CirculateRequest
  333. T}
  334. Prop    T{
  335. .PN PropertyNotify
  336. T}
  337. SelClr    T{
  338. .PN SelectionClear
  339. T}
  340. SelReq    T{
  341. .PN SelectionRequest
  342. T}
  343. Select    T{
  344. .PN SelectionNotify
  345. T}
  346. Clrmap    T{
  347. .PN ColormapNotify
  348. T}
  349. Message    T{
  350. .PN ClientMessage
  351. T}
  352. Mapping    T{
  353. .PN MappingNotify
  354. T}
  355. .sp 6p
  356. _
  357. .TE
  358. The supported abbreviations are:
  359. .TS H
  360. lw(1.5i) lw(1.25i) lw(1.75i).
  361. _
  362. .sp 6p
  363. .TB
  364. Abbreviation    Event Type    Including
  365. .sp 6p
  366. _
  367. .sp 6p
  368. .TH
  369. .R
  370. Ctrl    T{
  371. .PN KeyPress
  372. T}    with Control modifier
  373. Meta    T{
  374. .PN KeyPress
  375. T}    with Meta modifier
  376. Shift    T{
  377. .PN KeyPress
  378. T}    with Shift modifier
  379. Btn1Down    T{
  380. .PN ButtonPress
  381. T}    with Button1 detail
  382. Btn1Up    T{
  383. .PN ButtonRelease
  384. T}    with Button1 detail
  385. Btn2Down    T{
  386. .PN ButtonPress
  387. T}    with Button2 detail
  388. Btn2Up    T{
  389. .PN ButtonRelease
  390. T}    with Button2 detail
  391. Btn3Down    T{
  392. .PN ButtonPress
  393. T}    with Button3 detail
  394. Btn3Up    T{
  395. .PN ButtonRelease
  396. T}    with Button3 detail
  397. Btn4Down    T{
  398. .PN ButtonPress
  399. T}    with Button4 detail
  400. Btn4Up    T{
  401. .PN ButtonRelease
  402. T}    with Button4 detail
  403. Btn5Down    T{
  404. .PN ButtonPress
  405. T}    with Button5 detail
  406. Btn5Up    T{
  407. .PN ButtonRelease
  408. T}    with Button5 detail
  409. BtnMotion    T{
  410. .PN MotionNotify
  411. T}    with any button modifier
  412. Btn1Motion    T{
  413. .PN MotionNotify
  414. T}    with Button1 modifier
  415. Btn2Motion    T{
  416. .PN MotionNotify
  417. T}    with Button2 modifier
  418. Btn3Motion    T{
  419. .PN MotionNotify
  420. T}    with Button3 modifier
  421. Btn4Motion    T{
  422. .PN MotionNotify
  423. T}    with Button4 modifier
  424. Btn5Motion    T{
  425. .PN MotionNotify
  426. T}    with Button5 modifier
  427. .sp 6p
  428. _
  429. .TE
  430. .sp
  431. .LP
  432. The detail field is event-specific and normally corresponds to the
  433. detail field of the corresponding event as described
  434. by \fI\*(xP\fP, Section 11.  The detail field is supported
  435. for the following event types:
  436. .LP
  437. .TS
  438. l l .
  439. _
  440. .sp 6p
  441. .TB
  442. Event    Event Field
  443. .sp 6p
  444. _
  445. .sp 6p
  446. KeyPress    KeySym from event \fIdetail\fP (keycode)
  447. KeyRelease    KeySym from event \fIdetail\fP (keycode)
  448. ButtonPress    button from event \fIdetail\fP
  449. ButtonRelease    button from event \fIdetail\fP
  450. MotionNotify    event \fIdetail\fP
  451. EnterNotify    event \fImode\fP
  452. LeaveNotify    event \fImode\fP
  453. FocusIn    event \fImode\fP
  454. FocusOut    event \fImode\fP
  455. PropertyNotify    \fIatom\fP
  456. SelectionClear    \fIselection\fP
  457. SelectionRequest    \fIselection\fP
  458. SelectionNotify    \fIselection\fP
  459. ClientMessage    \fItype\fP
  460. MappingNotify    \fIrequest\fP
  461. .sp 6p
  462. _
  463. .TE
  464. .LP
  465. If the event type is
  466. .PN KeyPress
  467. or
  468. .PN KeyRelease ,
  469. the detail field
  470. specifies a KeySym name in standard format which is matched against
  471. the event as described above, for example, <Key>A.
  472. .LP
  473. For the
  474. .PN PropertyNotify ,
  475. .PN SelectionClear ,
  476. .PN SelectionRequest ,
  477. .PN SelectionNotify
  478. and
  479. .PN ClientMessage
  480. events the detail field is specified
  481. as an atom name; for example, <Message>WM_PROTOCOLS.  For the
  482. .PN MotionNotify ,
  483. .PN EnterNotify ,
  484. .PN LeaveNotify ,
  485. .PN FocusIn ,
  486. .PN FocusOut
  487. and
  488. .PN MappingNotify
  489. events, either the symbolic constants as defined by
  490. \fI\*(xP\fP, Section 11,
  491. or the numeric values may be specified.
  492. .LP
  493. If no detail field is specified, then any value in the event detail is
  494. accepted as a match.
  495. .LP
  496. A KeySym can be specified as any of the standard KeySym names, 
  497. a hexadecimal number prefixed with ``0x'' or ``0X'', 
  498. an octal number prefixed with ``0'' or a decimal number.
  499. A KeySym expressed as a single digit is interpreted as the
  500. corresponding Latin 1 KeySym, for example, ``0'' is the KeySym XK_0.
  501. Other single character KeySyms are treated as literal constants from Latin 1,
  502. for example, ``!'' is treated as 0x21.
  503. Standard KeySym names are as defined in 
  504. .Pn < X11/keysymdef.h >
  505. with the ``XK_'' prefix removed.
  506. .LP
  507. .SH
  508. Canonical Representation
  509. .LP
  510. Every translation table has a unique, canonical text representation. This
  511. representation is passed to a widget's
  512. .PN display_accelerator
  513. procedure to describe the accelerators installed on that widget.
  514. The canonical representation of a translation table is (see also
  515. ``Syntax'')
  516. .TS
  517. l l .
  518. translationTable    = { production }
  519. production    = lhs ``:'' rhs ``\\\\n''
  520. lhs    = event { ``,'' event  }
  521. event    = [modifier_list] ``<''event_type``>'' [ ``('' count[``+''] ``)'' ] {detail}
  522. modifier_list    = [``!''] [``:''] {modifier}
  523. modifier    = [``~''] modifier_name
  524. count    = (``1'' | ``2'' | ``3'' | ``4'' | ...)
  525. modifier_name    = ``@'' <keysym> | <see canonical modifier names below>
  526. event_type    = <see canonical event types below>
  527. detail    = <event specific details>
  528. rhs    = { name ``('' [params] ``)'' }
  529. name    = namechar { namechar }
  530. namechar    = { ``a''-``z'' | ``A''-``Z'' | ``0''-``9'' | ``_'' | ``-'' }
  531. params    = string {``,'' string}
  532. string    = quoted_string
  533. quoted_string    = ``"'' {<Latin 1 character> | escape_char} [``\\\\\\\\'' ] ``"''
  534. escape_char    = ``\\\\"''
  535. .TE
  536. .LP
  537. The canonical modifier names are
  538. .LP
  539. .Ds
  540. .TA 1i 1i 2.5i
  541. .ta 1i 1i 2.5i
  542. Ctrl    Mod1    Button1
  543. Shift    Mod2    Button2
  544. Lock    Mod3    Button3
  545.     Mod4    Button4
  546.     Mod5    Button5
  547. .De
  548. .LP
  549. The canonical event types are
  550. .IP
  551. .TS
  552. l l.
  553. T{
  554. .PN KeyPress
  555. T}    T{
  556. .PN KeyRelease
  557. T}
  558. T{
  559. .PN ButtonPress
  560. T}    T{
  561. .PN ButtonRelease
  562. T}
  563. T{
  564. .PN MotionNotify
  565. T}    T{
  566. .PN EnterNotify
  567. T}
  568. T{
  569. .PN LeaveNotify
  570. T}    T{
  571. .PN FocusIn
  572. T}
  573. T{
  574. .PN FocusOut
  575. T}    T{
  576. .PN KeymapNotify
  577. T}
  578. T{
  579. .PN Expose
  580. T}    T{
  581. .PN GraphicsExpose,
  582. T}
  583. T{
  584. .PN NoExpose
  585. T}    T{
  586. .PN VisibilityNotify
  587. T}
  588. T{
  589. .PN CreateNotify
  590. T}    T{
  591. .PN DestroyNotify
  592. T}
  593. T{
  594. .PN UnmapNotify
  595. T}    T{
  596. .PN MapNotify
  597. T}
  598. T{
  599. .PN MapRequest
  600. T}    T{
  601. .PN ReparentNotify
  602. T}
  603. T{
  604. .PN ConfigureNotify
  605. T}    T{
  606. .PN ConfigureRequest
  607. T}
  608. T{
  609. .PN GravityNotify
  610. T}    T{
  611. .PN ResizeRequest
  612. T}
  613. T{
  614. .PN CirculateNotify
  615. T}    T{
  616. .PN CirculateRequest
  617. T}
  618. T{
  619. .PN PropertyNotify
  620. T}    T{
  621. .PN SelectionClear
  622. T}
  623. T{
  624. .PN SelectionRequest
  625. T}    T{
  626. .PN SelectionNotify
  627. T}
  628. T{
  629. .PN ColormapNotify
  630. T}    T{
  631. .PN ClientMessage
  632. T}
  633. .TE
  634. .LP
  635.  
  636. .SH
  637. Examples
  638. .LP
  639. .IP \(bu 5
  640. Always put more specific events in the table before more general ones:
  641. .LP
  642. .Ds
  643. Shift <Btn1Down> : twas()\\n\\
  644. <Btn1Down> : brillig()
  645. .De
  646. .LP
  647. .IP \(bu 5
  648. For double-click on Button1 Up with Shift, use this specification:
  649. .IP
  650. .Ds
  651. Shift<Btn1Up>(2) : and()
  652. .DE
  653. .IP
  654. This is equivalent to the following line with appropriate timers set 
  655. between events:
  656. .IP
  657. .Ds
  658. Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>,Shift<Btn1Up> : and()
  659. .De
  660. .IP \(bu 5
  661. For double-click on Button1 Down with Shift, use this specification:
  662. .IP
  663. .Ds
  664. Shift<Btn1Down>(2) : the()
  665. .De
  666. .IP
  667. This is equivalent to the following line with appropriate timers set
  668. between events:
  669. .IP
  670. .Ds
  671. Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the()
  672. .De
  673. .IP \(bu 5
  674. Mouse motion is always discarded when it occurs between events in a table
  675. where no motion event is specified:
  676. .IP
  677. .Ds
  678. <Btn1Down>,<Btn1Up> : slithy()
  679. .De
  680. .IP
  681. This is taken, even if the pointer moves a bit between the down and
  682. up events.
  683. Similarly, any motion event specified in a translation matches any number
  684. of motion events.
  685. If the motion event causes an action procedure to be invoked,
  686. the procedure is invoked after each motion event.
  687. .IP \(bu 5
  688. If an event sequence consists of a sequence of events that is also a
  689. noninitial subsequence of another translation,
  690. it is not taken if it occurs in the context of the longer sequence.
  691. This occurs mostly in sequences like the following:
  692. .IP
  693. .Ds
  694. <Btn1Down>,<Btn1Up> : toves()\\n\\
  695. <Btn1Up> :  did()
  696. .De
  697. .IP
  698. The second translation is taken only if the button release is not
  699. preceded by a button press or if there are intervening events between the
  700. press and the release.
  701. Be particularly aware of this when using the repeat notation, above,
  702. with buttons and keys,
  703. because their expansion includes additional events;
  704. and when specifying motion events, because they are implicitly included
  705. between any two other events.
  706. In particular,
  707. pointer motion and double-click translations cannot coexist in the same
  708. translation table.
  709. .IP \(bu 5
  710. For single click on Button1 Up with Shift and Meta, use this specification:
  711. .IP
  712. .Ds
  713. Shift Meta <Btn1Down>, Shift Meta<Btn1Up>: gyre()
  714. .De
  715. .IP \(bu 5
  716. For multiple clicks greater or equal to a minimum number,
  717. a plus sign (+) may be appended to the final (rightmost)
  718. count in an event sequence.  The actions will be invoked
  719. on the \fIcount\fP-th click and each subsequent one arriving
  720. within the multi-click time interval.  For example:
  721. .IP
  722. .Ds
  723. Shift <Btn1Up>(2+) : and()
  724. .De
  725. .IP \(bu 5
  726. To indicate 
  727. .PN EnterNotify
  728. with any modifiers, use this specification:
  729. .IP
  730. .Ds
  731. <Enter> : gimble()
  732. .De
  733. .IP \(bu 5
  734. To indicate 
  735. .PN EnterNotify
  736. with no modifiers, use this specification:
  737. .IP
  738. .Ds
  739. None <Enter> : in()
  740. .De
  741. .IP \(bu 5
  742. To indicate 
  743. .PN EnterNotify 
  744. with Button1 Down and Button2 Up and ``don't care'' about
  745. the other modifiers, use this specification:
  746. .IP
  747. .Ds
  748. Button1 ~Button2 <Enter> : the()
  749. .De
  750. .IP \(bu 5
  751. To indicate 
  752. .PN EnterNotify
  753. with Button1 down and Button2 down exclusively, use this specification:
  754. .IP
  755. .Ds
  756. ! Button1 Button2 <Enter> : wabe()
  757. .De
  758. .IP
  759. You do not need to use a tilde (~) with an exclamation point (!).
  760.