keyboard.rng 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of DocBook V5.0
  4. Copyright 1992-2008 HaL Computer Systems, Inc.,
  5. O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  6. Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  7. Organization for the Advancement of Structured Information
  8. Standards (OASIS).
  9. Release: $Id: pool.rnc 7466 2007-09-27 14:03:55Z nwalsh $
  10. Permission to use, copy, modify and distribute the DocBook schema
  11. and its accompanying documentation for any purpose and without fee
  12. is hereby granted in perpetuity, provided that the above copyright
  13. notice and this paragraph appear in all copies. The copyright
  14. holders make no representation about the suitability of the schema
  15. for any purpose. It is provided "as is" without expressed or implied
  16. warranty.
  17. If you modify the DocBook schema in any way, label your schema as a
  18. variant of DocBook. See the reference documentation
  19. (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  20. for more information.
  21. Please direct all questions, bug reports, or suggestions for changes
  22. to the docbook@lists.oasis-open.org mailing list. For more
  23. information, see http://www.oasis-open.org/docbook/.
  24. ======================================================================
  25. -->
  26. <grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0">
  27. <define name="db.domain.inlines" combine="choice">
  28. <ref name="db.keyboard.inlines"/>
  29. </define>
  30. <define name="db.userinput.inlines" combine="choice">
  31. <ref name="db.keyboard.inlines"/>
  32. </define>
  33. <define name="db.keyboard.inlines">
  34. <choice>
  35. <ref name="db.keycombo"/>
  36. <ref name="db.keycap"/>
  37. <ref name="db.keycode"/>
  38. <ref name="db.keysym"/>
  39. <ref name="db.shortcut"/>
  40. <ref name="db.accel"/>
  41. </choice>
  42. </define>
  43. <!-- ====================================================================== -->
  44. <div>
  45. <db:refname>keycap</db:refname>
  46. <db:refpurpose>The text printed on a key on a keyboard</db:refpurpose>
  47. <ctrl:other-attribute name="db.keycap.function.attrib" enum-name="db.keycap.function-enum.attribute" other-name="db.keycap.function-other.attributes"/>
  48. <define name="db.keycap.function.enumeration">
  49. <choice>
  50. <value>alt</value>
  51. <a:documentation>The "Alt" key</a:documentation>
  52. <value>backspace</value>
  53. <a:documentation>The "Backspace" key</a:documentation>
  54. <value>command</value>
  55. <a:documentation>The "Command" key</a:documentation>
  56. <value>control</value>
  57. <a:documentation>The "Control" key</a:documentation>
  58. <value>delete</value>
  59. <a:documentation>The "Delete" key</a:documentation>
  60. <value>down</value>
  61. <a:documentation>The down arrow</a:documentation>
  62. <value>end</value>
  63. <a:documentation>The "End" key</a:documentation>
  64. <value>enter</value>
  65. <a:documentation>The "Enter" or "Return" key</a:documentation>
  66. <value>escape</value>
  67. <a:documentation>The "Escape" key</a:documentation>
  68. <value>home</value>
  69. <a:documentation>The "Home" key</a:documentation>
  70. <value>insert</value>
  71. <a:documentation>The "Insert" key</a:documentation>
  72. <value>left</value>
  73. <a:documentation>The left arrow</a:documentation>
  74. <value>meta</value>
  75. <a:documentation>The "Meta" key</a:documentation>
  76. <value>option</value>
  77. <a:documentation>The "Option" key</a:documentation>
  78. <value>pagedown</value>
  79. <a:documentation>The page down key</a:documentation>
  80. <value>pageup</value>
  81. <a:documentation>The page up key</a:documentation>
  82. <value>right</value>
  83. <a:documentation>The right arrow</a:documentation>
  84. <value>shift</value>
  85. <a:documentation>The "Shift" key</a:documentation>
  86. <value>space</value>
  87. <a:documentation>The spacebar</a:documentation>
  88. <value>tab</value>
  89. <a:documentation>The "Tab" key</a:documentation>
  90. <value>up</value>
  91. <a:documentation>The up arrow</a:documentation>
  92. </choice>
  93. </define>
  94. <define name="db.keycap.function-enum.attribute">
  95. <optional>
  96. <attribute name="function">
  97. <db:refpurpose>Identifies the function key</db:refpurpose>
  98. <ref name="db.keycap.function.enumeration"/>
  99. </attribute>
  100. </optional>
  101. </define>
  102. <define name="db.keycap.function-other.attributes">
  103. <optional>
  104. <attribute name="function">
  105. <db:refpurpose>Identifies the function key</db:refpurpose>
  106. <value>other</value>
  107. <a:documentation>Indicates a non-standard function key</a:documentation>
  108. </attribute>
  109. </optional>
  110. <attribute name="otherfunction">
  111. <db:refpurpose>Specifies a keyword that identifies the non-standard key</db:refpurpose>
  112. </attribute>
  113. </define>
  114. <define name="db.keycap.function.attrib">
  115. <choice>
  116. <ref name="db.keycap.function-enum.attribute"/>
  117. <ref name="db.keycap.function-other.attributes"/>
  118. </choice>
  119. </define>
  120. <define name="db.keycap.role.attribute">
  121. <attribute name="role"/>
  122. </define>
  123. <define name="db.keycap.attlist">
  124. <interleave>
  125. <optional>
  126. <ref name="db.keycap.role.attribute"/>
  127. </optional>
  128. <ref name="db.common.attributes"/>
  129. <ref name="db.common.linking.attributes"/>
  130. <ref name="db.keycap.function.attrib"/>
  131. </interleave>
  132. </define>
  133. <define name="db.keycap">
  134. <element name="keycap">
  135. <ref name="db.keycap.attlist"/>
  136. <ref name="db._text"/>
  137. </element>
  138. </define>
  139. </div>
  140. <!-- ====================================================================== -->
  141. <div>
  142. <db:refname>keycode</db:refname>
  143. <db:refpurpose>The internal, frequently numeric, identifier for a key on a keyboard</db:refpurpose>
  144. <define name="db.keycode.role.attribute">
  145. <attribute name="role"/>
  146. </define>
  147. <define name="db.keycode.attlist">
  148. <interleave>
  149. <optional>
  150. <ref name="db.keycode.role.attribute"/>
  151. </optional>
  152. <ref name="db.common.attributes"/>
  153. <ref name="db.common.linking.attributes"/>
  154. </interleave>
  155. </define>
  156. <define name="db.keycode">
  157. <element name="keycode">
  158. <ref name="db.keycode.attlist"/>
  159. <ref name="db._text"/>
  160. </element>
  161. </define>
  162. </div>
  163. <!-- ====================================================================== -->
  164. <define name="db.keycombination.contentmodel">
  165. <choice>
  166. <ref name="db.keycap"/>
  167. <ref name="db.keycombo"/>
  168. <ref name="db.keysym"/>
  169. </choice>
  170. </define>
  171. <div>
  172. <db:refname>keycombo</db:refname>
  173. <db:refpurpose>A combination of input actions</db:refpurpose>
  174. <ctrl:other-attribute name="db.keycombo.action.attrib" enum-name="db.keycombo.action-enum.attribute" other-name="db.keycombo.action-other.attributes"/>
  175. <define name="db.keycombo.action.enumeration">
  176. <choice>
  177. <value>click</value>
  178. <a:documentation>A (single) mouse click.</a:documentation>
  179. <value>double-click</value>
  180. <a:documentation>A double mouse click.</a:documentation>
  181. <value>press</value>
  182. <a:documentation>A mouse or key press.</a:documentation>
  183. <value>seq</value>
  184. <a:documentation>Sequential clicks or presses.</a:documentation>
  185. <value>simul</value>
  186. <a:documentation>Simultaneous clicks or presses.</a:documentation>
  187. </choice>
  188. </define>
  189. <define name="db.keycombo.action-enum.attribute">
  190. <optional>
  191. <attribute name="action">
  192. <db:refpurpose>Identifies the nature of the action taken. If <db:tag>keycombo</db:tag>
  193. contains more than one element, <db:tag class="attvalue">simul</db:tag>
  194. is the default, otherwise there is no default.</db:refpurpose>
  195. <ref name="db.keycombo.action.enumeration"/>
  196. </attribute>
  197. </optional>
  198. </define>
  199. <define name="db.keycombo.action-other.attributes">
  200. <optional>
  201. <attribute name="action">
  202. <db:refpurpose>Identifies the nature of the action taken</db:refpurpose>
  203. <value>other</value>
  204. <a:documentation>Indicates a non-standard action</a:documentation>
  205. </attribute>
  206. </optional>
  207. <attribute name="otheraction">
  208. <db:refpurpose>Identifies the non-standard action in some unspecified way.</db:refpurpose>
  209. </attribute>
  210. </define>
  211. <define name="db.keycombo.action.attrib">
  212. <choice>
  213. <ref name="db.keycombo.action-enum.attribute"/>
  214. <ref name="db.keycombo.action-other.attributes"/>
  215. </choice>
  216. </define>
  217. <define name="db.keycombo.role.attribute">
  218. <attribute name="role"/>
  219. </define>
  220. <define name="db.keycombo.attlist">
  221. <interleave>
  222. <optional>
  223. <ref name="db.keycombo.role.attribute"/>
  224. </optional>
  225. <ref name="db.common.attributes"/>
  226. <ref name="db.common.linking.attributes"/>
  227. <ref name="db.keycombo.action.attrib"/>
  228. </interleave>
  229. </define>
  230. <define name="db.keycombo">
  231. <element name="keycombo">
  232. <ref name="db.keycombo.attlist"/>
  233. <oneOrMore>
  234. <ref name="db.keycombination.contentmodel"/>
  235. </oneOrMore>
  236. </element>
  237. </define>
  238. </div>
  239. <!-- ====================================================================== -->
  240. <div>
  241. <db:refname>keysym</db:refname>
  242. <db:refpurpose>The symbolic name of a key on a keyboard</db:refpurpose>
  243. <define name="db.keysym.role.attribute">
  244. <attribute name="role"/>
  245. </define>
  246. <define name="db.keysym.attlist">
  247. <interleave>
  248. <optional>
  249. <ref name="db.keysym.role.attribute"/>
  250. </optional>
  251. <ref name="db.common.attributes"/>
  252. <ref name="db.common.linking.attributes"/>
  253. </interleave>
  254. </define>
  255. <define name="db.keysym">
  256. <element name="keysym">
  257. <ref name="db.keysym.attlist"/>
  258. <ref name="db._text"/>
  259. </element>
  260. </define>
  261. </div>
  262. <!-- ====================================================================== -->
  263. <div>
  264. <db:refname>accel</db:refname>
  265. <db:refpurpose>A graphical user interface (GUI) keyboard shortcut</db:refpurpose>
  266. <define name="db.accel.role.attribute">
  267. <attribute name="role"/>
  268. </define>
  269. <define name="db.accel.attlist">
  270. <interleave>
  271. <optional>
  272. <ref name="db.accel.role.attribute"/>
  273. </optional>
  274. <ref name="db.common.attributes"/>
  275. <ref name="db.common.linking.attributes"/>
  276. </interleave>
  277. </define>
  278. <define name="db.accel">
  279. <element name="accel">
  280. <ref name="db.accel.attlist"/>
  281. <ref name="db._text"/>
  282. </element>
  283. </define>
  284. </div>
  285. <!-- ====================================================================== -->
  286. <div>
  287. <db:refname>shortcut</db:refname>
  288. <db:refpurpose>A key combination for an action that is also accessible through a menu</db:refpurpose>
  289. <define name="db.shortcut.action.attrib">
  290. <ref name="db.keycombo.action.attrib"/>
  291. </define>
  292. <define name="db.shortcut.role.attribute">
  293. <attribute name="role"/>
  294. </define>
  295. <define name="db.shortcut.attlist">
  296. <interleave>
  297. <optional>
  298. <ref name="db.shortcut.role.attribute"/>
  299. </optional>
  300. <ref name="db.common.attributes"/>
  301. <ref name="db.common.linking.attributes"/>
  302. <ref name="db.shortcut.action.attrib"/>
  303. </interleave>
  304. </define>
  305. <define name="db.shortcut">
  306. <element name="shortcut">
  307. <ref name="db.shortcut.attlist"/>
  308. <oneOrMore>
  309. <ref name="db.keycombination.contentmodel"/>
  310. </oneOrMore>
  311. </element>
  312. </define>
  313. </div>
  314. </grammar>