Updated Keyboard docs

This commit is contained in:
Jeff Parsons 2017-09-12 10:20:20 -07:00 committed by Jeff Parsons
commit 9d356c582b

View file

@ -5,21 +5,24 @@ permalink: /docs/pcx86/keyboard/
--- ---
PCx86 Keyboard Component PCx86 Keyboard Component
--- ------------------------
Format Format
--- ------
```xml ```xml
<keyboard>...</keyboard> <keyboard>...</keyboard>
``` ```
Purpose Purpose
--- -------
Creates an instance of the Keyboard component, which maps JavaScript key events (or other control events) to Creates an instance of the Keyboard component, which maps JavaScript key events (or other control events) to
IBM PC keyboard scan codes. IBM PC keyboard scan codes.
Attributes Attributes
--- ----------
* *model* (optional) * *model* (optional)
* us83: US keyboard with 83-key layout (default) * us83: US keyboard with 83-key layout (default)
* us84: US keyboard with 84-key layout * us84: US keyboard with 84-key layout
@ -28,7 +31,8 @@ Attributes
Also supports the attributes of *[Component](/docs/pcx86/component/)*. Also supports the attributes of *[Component](/docs/pcx86/component/)*.
Bindings Bindings
--- --------
* *esc*, *ctrl-c*, *ctrl-alt-del*, *left-arrow*, *up-arrow*, *right-arrow*, *down-arrow*, *f1*, *f2*, *f3*, *f4*, *f5*, *f6*, *f7*, *f8*, *f9*, *f10*, ... * *esc*, *ctrl-c*, *ctrl-alt-del*, *left-arrow*, *up-arrow*, *right-arrow*, *down-arrow*, *f1*, *f2*, *f3*, *f4*, *f5*, *f6*, *f7*, *f8*, *f9*, *f10*, ...
For use with a control of type button (or other control that supports the "onclick" event), to simulate the For use with a control of type button (or other control that supports the "onclick" event), to simulate the
@ -42,7 +46,8 @@ element to them, so they are generally unavailable for other components to use.
for the specified model. for the specified model.
Example Example
--- -------
```xml ```xml
<keyboard id="keyboard" model="us83"/> <keyboard id="keyboard" model="us83"/>
``` ```
@ -51,7 +56,8 @@ See [/devices/pcx86/keyboard/us83-softkeys.xml](/devices/pcx86/keyboard/us83-sof
complete "soft keyboard". complete "soft keyboard".
Output Output
--- ------
```html ```html
<div id="..." class="pc-keyboard pc-component"> <div id="..." class="pc-keyboard pc-component">
<div class="pc-container"> <div class="pc-container">