Add table with initial set of keyboard 'code' values.
authorGary Kacmarcik <garykac@google.com>
Mon, 10 Dec 2012 10:32:27 -0800
changeset 2 c4b61947fed2
parent 1 dea92c0ca77b
child 3 322ba7c75c64
Add table with initial set of keyboard 'code' values.
source_respec.htm
table.css
--- a/source_respec.htm	Wed Dec 05 14:05:43 2012 -0800
+++ b/source_respec.htm	Mon Dec 10 10:32:27 2012 -0800
@@ -6,6 +6,7 @@
     <title>DOM4 Events</title>
     <script type="text/javascript" src='http://darobin.github.com/respec/builds/respec-w3c-common.js' class='remove'></script>
     <script type="text/javascript" src="respecEdConfig.js" class='remove'></script>
+    <link rel="stylesheet" type="text/css" href="table.css" media="screen" />
 </head>
 <body>
     <section id="abstract">
@@ -317,6 +318,14 @@
                     If the key is not a printable character, then it should be one of
                     the key values defined in [[DOM-LEVEL-3-EVENTS]].
                 </dd>
+                <dt>DOMString code = ""</dt>
+                <dd>Initializes the <code>code</code> attribute of the KeyboardEvent
+                    object to the unicode character string representing the key that
+                    was pressed, ignoring any keyboard modifications such as keyboard
+                    layout.
+                    This value should be one of the code values defined in the
+                    [<a href="#table-keyboard-code">List of keyboard code values</a>] table.
+                </dd>
                 <dt>unsigned long location = 0</dt>
                 <dd>
                     Initializes the <code>location</code> attribute of the KeyboardEvent
@@ -388,5 +397,115 @@
         </section>
     </section>
 
+    <section id="keyboard-events">
+        <h1>Keyboard Events</h1>
+        <p>DOM4 Keyboard Events extend upon those defined in DOM Level 3. Features in scope for this specification are</p>
+
+        <section id="key-codes">
+            <h2>Key Codes</h2>
+            <p>Key codes are used to identify the physical key that was pressed by the user.
+            </p>
+            <dl>
+            <table id="table-keyboard-code" class="data-table">
+            	<caption>Table 1: List of keyboard code values.</caption>
+                <thead><tr><th>Code Value</th><th>ISO/IEC 9995-2<br/>(Informative)</th><th>USB Usage ID Page 0x07<br/>(Informative)</th><th>Notes</th></tr></thead>
+                <tbody>
+                    <tr><td><code id="code-AltLeft" class="key-code">'AltLeft'</code></td><td>A02</td><td>0xe2</td><td>Labeled 'Alt' or 'Option'.</td></tr>
+                    <tr><td><code id="code-AltRight" class="key-code">'AltRight'</code></td><td>A08</td><td>0xe6</td><td>Labeled 'Alt' or 'Option'. This is the 'AltGr' key on many keyboard layouts.</td></tr>
+                    <tr><td><code id="code-AppContextMenu" class="key-code">'AppContextMenu'</code></td><td></td><td>0x65</td><td>The application context menu key, which is typically found between the right OS key and the right Control key.</td></tr>
+                    <tr><td><code id="code-ArrowDown" class="key-code">'ArrowDown'</code></td><td></td><td>0x51</td><td></td></tr>
+                    <tr><td><code id="code-ArrowLeft" class="key-code">'ArrowLeft'</code></td><td></td><td>0x50</td><td></td></tr>
+                    <tr><td><code id="code-ArrowRight" class="key-code">'ArrowRight'</code></td><td></td><td>0x4f</td><td></td></tr>
+                    <tr><td><code id="code-ArrowUp" class="key-code">'ArrowUp'</code></td><td></td><td>0x52</td><td></td></tr>
+                    <tr><td><code id="code-BackQuote" class="key-code">'BackQuote'</code></td><td>E00</td><td>0x35</td><td></td></tr>
+                    <tr><td><code id="code-Backslash" class="key-code">'Backslash'</code></td><td>D13</td><td>0x31</td><td></td></tr>
+                    <tr><td><code id="code-Backspace" class="key-code">'Backspace'</code></td><td>E14</td><td>0x2a</td><td>Sometimes labeled 'Delete'.</td></tr>
+                    <tr><td><code id="code-BracketLeft" class="key-code">'BracketLeft'</code></td><td>D11</td><td>0x2f</td><td></td></tr>
+                    <tr><td><code id="code-BracketRight" class="key-code">'BracketRight'</code></td><td>D12</td><td>0x30</td><td></td></tr>
+                    <tr><td><code id="code-CapsLock" class="key-code">'CapsLock'</code></td><td>C00</td><td>0x39</td><td></td></tr>
+                    <tr><td><code id="code-Comma" class="key-code">'Comma'</code></td><td>B08</td><td>0x36</td><td>The , and &lt; key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-ControlLeft" class="key-code">'ControlLeft'</code></td><td>A99</td><td>0xe0</td><td></td></tr>
+                    <tr><td><code id="code-ControlRight" class="key-code">'ControlRight'</code></td><td>A12</td><td>0xe4</td><td></td></tr>
+                    <tr><td><code id="code-Convert" class="key-code">'Convert'</code></td><td>A06</td><td>0x8a</td><td>Henkan on a Japanese keyboard.</td></tr>
+                    <tr><td><code id="code-Enter" class="key-code">'Enter'</code></td><td>C13</td><td>0x32</td><td>Sometimes labeled 'Return'.</td></tr>
+                    <tr><td><code id="code-Equal" class="key-code">'Equal'</code></td><td>E12</td><td>0x2e</td><td>The = and + key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-Esc" class="key-code">'Esc'</code></td><td></td><td>0x29</td><td></td></tr>
+                    <tr><td><code id="code-F1" class="key-code">'F1'</code></td><td></td><td>0x3a</td><td></td></tr>
+                    <tr><td><code id="code-F2" class="key-code">'F2'</code></td><td></td><td>0x3b</td><td></td></tr>
+                    <tr><td><code id="code-F3" class="key-code">'F3'</code></td><td></td><td>0x3c</td><td></td></tr>
+                    <tr><td><code id="code-F4" class="key-code">'F4'</code></td><td></td><td>0x3d</td><td></td></tr>
+                    <tr><td><code id="code-F5" class="key-code">'F5'</code></td><td></td><td>0x3e</td><td></td></tr>
+                    <tr><td><code id="code-F6" class="key-code">'F6'</code></td><td></td><td>0x3f</td><td></td></tr>
+                    <tr><td><code id="code-F7" class="key-code">'F7'</code></td><td></td><td>0x40</td><td></td></tr>
+                    <tr><td><code id="code-F8" class="key-code">'F8'</code></td><td></td><td>0x41</td><td></td></tr>
+                    <tr><td><code id="code-F9" class="key-code">'F9'</code></td><td></td><td>0x42</td><td></td></tr>
+                    <tr><td><code id="code-F10" class="key-code">'F10'</code></td><td></td><td>0x43</td><td></td></tr>
+                    <tr><td><code id="code-F11" class="key-code">'F11'</code></td><td></td><td>0x44</td><td></td></tr>
+                    <tr><td><code id="code-F12" class="key-code">'F12'</code></td><td></td><td>0x45</td><td></td></tr>
+                    <tr><td><code id="code-IntlBackslash" class="key-code">'IntlBackslash'</code></td><td>B00</td><td>0x64</td><td></td></tr>
+                    <tr><td><code id="code-IntlHash" class="key-code">'IntlHash'</code></td><td>C12</td><td>0x32</td><td>Non-US # and ~.</td></tr>
+                    <tr><td><code id="code-IntlRo" class="key-code">'IntlRo'</code></td><td>B11</td><td>0x87</td><td></td></tr>
+                    <tr><td><code id="code-IntlYen" class="key-code">'IntlYen'</code></td><td>E13</td><td>0x89</td><td>The ¥ key on a Japanese keyboard. The \ and / key on a Russian keyboard.</td></tr>
+                    <tr><td><code id="code-KanaMode" class="key-code">'KanaMode'</code></td><td>A07</td><td>0x88</td><td>Hiragana/Katakana key on a Japanese keyboard.</td></tr>
+                    <tr><td><code id="code-KeyA" class="key-code">'KeyA'</code></td><td>C01</td><td>0x04</td><td>The 'q' key on an AZERTY (e.g., French) keyboard.</td></tr>
+                    <tr><td><code id="code-KeyB" class="key-code">'KeyB'</code></td><td>B05</td><td>0x05</td><td></td></tr>
+                    <tr><td><code id="code-KeyC" class="key-code">'KeyC'</code></td><td>B03</td><td>0x06</td><td></td></tr>
+                    <tr><td><code id="code-KeyD" class="key-code">'KeyD'</code></td><td>C03</td><td>0x07</td><td></td></tr>
+                    <tr><td><code id="code-KeyE" class="key-code">'KeyE'</code></td><td>D03</td><td>0x08</td><td></td></tr>
+                    <tr><td><code id="code-KeyF" class="key-code">'KeyF'</code></td><td>C04</td><td>0x09</td><td></td></tr>
+                    <tr><td><code id="code-KeyG" class="key-code">'KeyG'</code></td><td>C05</td><td>0x0a</td><td></td></tr>
+                    <tr><td><code id="code-KeyH" class="key-code">'KeyH'</code></td><td>C06</td><td>0x0b</td><td></td></tr>
+                    <tr><td><code id="code-KeyI" class="key-code">'KeyI'</code></td><td>D08</td><td>0x0c</td><td></td></tr>
+                    <tr><td><code id="code-KeyJ" class="key-code">'KeyJ'</code></td><td>C07</td><td>0x0d</td><td></td></tr>
+                    <tr><td><code id="code-KeyK" class="key-code">'KeyK'</code></td><td>C08</td><td>0x0e</td><td></td></tr>
+                    <tr><td><code id="code-KeyL" class="key-code">'KeyL'</code></td><td>C09</td><td>0x0f</td><td></td></tr>
+                    <tr><td><code id="code-KeyM" class="key-code">'KeyM'</code></td><td>B07</td><td>0x10</td><td></td></tr>
+                    <tr><td><code id="code-KeyN" class="key-code">'KeyN'</code></td><td>B06</td><td>0x11</td><td></td></tr>
+                    <tr><td><code id="code-KeyO" class="key-code">'KeyO'</code></td><td>D09</td><td>0x12</td><td></td></tr>
+                    <tr><td><code id="code-KeyP" class="key-code">'KeyP'</code></td><td>D10</td><td>0x13</td><td></td></tr>
+                    <tr><td><code id="code-KeyQ" class="key-code">'KeyQ'</code></td><td>D01</td><td>0x14</td><td>The 'a' key on an AZERTY (e.g., French) keyboard.</td></tr>
+                    <tr><td><code id="code-KeyR" class="key-code">'KeyR'</code></td><td>D04</td><td>0x15</td><td></td></tr>
+                    <tr><td><code id="code-KeyS" class="key-code">'KeyS'</code></td><td>C02</td><td>0x16</td><td></td></tr>
+                    <tr><td><code id="code-KeyT" class="key-code">'KeyT'</code></td><td>D05</td><td>0x17</td><td></td></tr>
+                    <tr><td><code id="code-KeyU" class="key-code">'KeyU'</code></td><td>D07</td><td>0x18</td><td></td></tr>
+                    <tr><td><code id="code-KeyV" class="key-code">'KeyV'</code></td><td>B04</td><td>0x19</td><td></td></tr>
+                    <tr><td><code id="code-KeyW" class="key-code">'KeyW'</code></td><td>D02</td><td>0x1a</td><td>The 'z' key on an AZERTY (e.g., French) keyboard.</td></tr>
+                    <tr><td><code id="code-KeyX" class="key-code">'KeyX'</code></td><td>B02</td><td>0x1b</td><td></td></tr>
+                    <tr><td><code id="code-KeyY" class="key-code">'KeyY'</code></td><td>D06</td><td>0x1c</td><td>The 'z' key on a QWERTZ (e.g., German) keyboard.</td></tr>
+                    <tr><td><code id="code-KeyZ" class="key-code">'KeyZ'</code></td><td>B01</td><td>0x1d</td><td>The 'w' key on an AZERTY (e.g., French) keyboard, and the 'y' key on a QWERTZ (e.g., German) keyboard.</td></tr>
+                    <tr><td><code id="code-Minus" class="key-code">'Minus'</code></td><td>E11</td><td>0x2d</td><td>The - and _ key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-Nonconvert" class="key-code">'Nonconvert'</code></td><td>A03</td><td>0x8b</td><td>Muhenkan on Japanese keyboard.</td></tr>
+                    <tr><td><code id="code-NumLock" class="key-code">'NumLock'</code></td><td></td><td>0x53</td><td></td></tr>
+                    <tr><td><code id="code-Numpad0" class="key-code">'Numpad0'</code></td><td></td><td>0x62</td><td></td></tr>
+                    <tr><td><code id="code-Numpad1" class="key-code">'Numpad1'</code></td><td></td><td>0x59</td><td></td></tr>
+                    <tr><td><code id="code-Numpad2" class="key-code">'Numpad2'</code></td><td></td><td>0x5a</td><td></td></tr>
+                    <tr><td><code id="code-Numpad3" class="key-code">'Numpad3'</code></td><td></td><td>0x5b</td><td></td></tr>
+                    <tr><td><code id="code-Numpad4" class="key-code">'Numpad4'</code></td><td></td><td>0x5c</td><td></td></tr>
+                    <tr><td><code id="code-Numpad5" class="key-code">'Numpad5'</code></td><td></td><td>0x5d</td><td></td></tr>
+                    <tr><td><code id="code-Numpad6" class="key-code">'Numpad6'</code></td><td></td><td>0x5e</td><td></td></tr>
+                    <tr><td><code id="code-Numpad7" class="key-code">'Numpad7'</code></td><td></td><td>0x5f</td><td></td></tr>
+                    <tr><td><code id="code-Numpad8" class="key-code">'Numpad8'</code></td><td></td><td>0x60</td><td></td></tr>
+                    <tr><td><code id="code-Numpad9" class="key-code">'Numpad9'</code></td><td></td><td>0x61</td><td></td></tr>
+                    <tr><td><code id="code-NumpadAdd" class="key-code">'NumpadAdd'</code></td><td></td><td>0x57</td><td></td></tr>
+                    <tr><td><code id="code-NumpadDecimal" class="key-code">'NumpadDecimal'</code></td><td></td><td></td><td></td></tr>
+                    <tr><td><code id="code-NumpadDivide" class="key-code">'NumpadDivide'</code></td><td></td><td>0x54</td><td></td></tr>
+                    <tr><td><code id="code-NumpadEnter" class="key-code">'NumpadEnter'</code></td><td></td><td>0x58</td><td></td></tr>
+                    <tr><td><code id="code-NumpadMultiply" class="key-code">'NumpadMultiply'</code></td><td></td><td>0x55</td><td></td></tr>
+                    <tr><td><code id="code-NumpadSubtract" class="key-code">'NumpadSubtract'</code></td><td></td><td>0x56</td><td></td></tr>
+                    <tr><td><code id="code-OSLeft" class="key-code">'OSLeft'</code></td><td>A01</td><td>0xe3</td><td>The Windows, ⌘, Command or other OS symbol key.</td></tr>
+                    <tr><td><code id="code-OSRight" class="key-code">'OSRight'</code></td><td>A10</td><td>0xe7</td><td>The Windows, ⌘, Command or other OS symbol key.</td></tr>
+                    <tr><td><code id="code-Period" class="key-code">'Period'</code></td><td>B09</td><td>0x37</td><td>The . and &gt; key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-Quote" class="key-code">'Quote'</code></td><td>C11</td><td>0x34</td><td>The ' and " key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-Semicolon" class="key-code">'Semicolon'</code></td><td>C10</td><td>0x33</td><td>The ; and : key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-ShiftLeft" class="key-code">'ShiftLeft'</code></td><td>B99</td><td>0xe1</td><td></td></tr>
+                    <tr><td><code id="code-ShiftRight" class="key-code">'ShiftRight'</code></td><td>B12</td><td>0xe5</td><td></td></tr>
+                    <tr><td><code id="code-Slash" class="key-code">'Slash'</code></td><td>B10</td><td>0x38</td><td>The / and ? key on a US keyboard.</td></tr>
+                    <tr><td><code id="code-Spacebar" class="key-code">'Spacebar'</code></td><td>A03/A04</td><td>0x2c</td><td>The Spacebar generally occupies the A03 position in ISO/IEC 9995-2, but the Japanese keyboard has an extra key there which pushes this over to A04.</td></tr>
+                    <tr><td><code id="code-Tab" class="key-code">'Tab'</code></td><td>D00</td><td>0x2b</td><td></td></tr>
+                </tbody>
+            </table></dl>
+        </section>
+    </section>
+
 </body>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/table.css	Mon Dec 10 10:32:27 2012 -0800
@@ -0,0 +1,115 @@
+/* default alignment for tables */
+table {
+   margin-bottom: 1em;
+}
+
+td {
+ vertical-align: middle;
+}
+
+
+.key-code {
+color: midnightBlue;
+background-color: powderBlue;
+}
+
+.data-table {
+  border-collapse:collapse;
+  text-align:left;
+}
+
+.data-table th {
+  background:none repeat scroll 0 0 #B9C9FE;
+  border-bottom:1px solid #FFFFFF;
+  border-top:4px solid #AABCFE;
+  color:#003399;
+  font-weight:normal;
+  padding: 2px;
+  padding-left: 0.5em;
+}
+
+.data-table td {
+  background:none repeat scroll 0 0 #E8EDFF;
+  border-bottom:1px solid #FFFFFF;
+  border-top:1px solid transparent;
+  color:#666699;
+  padding: 2px;
+  padding-left: 1em;
+}
+
+.data-table tr:hover td {
+  background:none repeat scroll 0 0 #D0DAFD;
+  color:#333399;
+}
+
+
+/* style for event definition tables */
+
+.keyevent-code table {
+  border: 2px solid black;
+  width: 95%;
+}
+
+.keyevent-code td,
+.keyevent-code th {
+  border-bottom: 1px dashed #ccc;
+  padding-left: 8px;
+  padding-right: 8px;
+}
+
+.keyevent-code th {
+  text-align: left;
+  font-weight: normal;
+  border-right: 1px dashed #ccc;
+  white-space: nowrap;
+  background-color: #D9E6F8;
+  background-color: #F7F5D7;
+  background-color: #D0DAFD;
+}
+
+.keyevent-code td {
+  width: 100%;
+}
+
+.keyevent-code tr:last-child td {
+  border-bottom: none;
+}
+
+.keyevent-code dfn a {
+  font-family: monospace;
+  color: black;
+  font-weight: normal;
+  font-style: normal;
+  padding-left: 1em;
+  padding-right: 1em;
+  padding-top: 0.2em;
+  background-color: #FFC500;
+}
+
+.keyevent-code dd table {
+  margin-bottom: -0.02em;
+}
+
+.keyevent-code a {
+  text-decoration: none
+}
+
+.keyevent-code td b {
+  font-weight: normal
+}
+
+.keyevent-code dd {
+  margin-top: 4px
+}
+
+/* style for context info event definition lists */
+
+.keyevent-code td > ul > li {
+  margin-left: -2.5em;
+  list-style: none;
+  border-bottom: 1px dashed #ccc;
+}
+
+.keyevent-code td > ul > li.last {
+  border-bottom: none;
+}