provided code
88
specs/kbd/abnt-keypad.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>ABNT keypad</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<CENTER><H2>ABNT keyboard keypad layout</H2></CENTER>
|
||||
<CENTER>Key label and scancode (hex) and Linux keycode (decimal)
|
||||
for a Brazilian ABNT keyboard keypad.</CENTER>
|
||||
<p>
|
||||
<TABLE BORDER=1 ALIGN="CENTER"
|
||||
<TR>
|
||||
<TD ALIGN="Center" WIDTH=40>Num<br>Lock</TD>
|
||||
<TD ALIGN="Center" WIDTH=40> / </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> * </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> - </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>45</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>e0 45</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>37</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4a</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 69 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 98 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 55 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 74 </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="Center" WIDTH=40> 7<br>Home </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 8<br>Up </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 9<br>PgUp </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> + </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>47</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>48</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>49</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4e</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 71 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 72 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 73 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 78 </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="Center" WIDTH=40> 4<br>Left </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 5 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 6<br>Right </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> . </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4b</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4c</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4d</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>7e</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 75 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 76 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 77 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 121 </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="Center" WIDTH=40> 1<br>End </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 2<br>Down </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 3<br>PgDn </TD>
|
||||
<TD ALIGN="Center" WIDTH=40 ROWSPAN=2> Enter </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>4f</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>50</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>51</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40 ROWSPAN=2> <B>e0 1c</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 79 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 80 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 81 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40 ROWSPAN=2> 96 </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD ALIGN="Center" COLSPAN=2> 0<br>Ins </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> ,<br>Del </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" COLSPAN=2> <B>52</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> <B>53</B> </TD>
|
||||
<TD ALIGN="Center" WIDTH=60> </TD>
|
||||
<TD ALIGN="Center" COLSPAN=2> 82 </TD>
|
||||
<TD ALIGN="Center" WIDTH=40> 83 </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
BIN
specs/kbd/amstrad-s.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
specs/kbd/amstrad.jpg
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
specs/kbd/compaq_easy_access.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
specs/kbd/compaq_unkn-s.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
specs/kbd/compaq_unkn.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
specs/kbd/ibm_rapid_access.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
specs/kbd/ibm_rapid_access_II.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
specs/kbd/imb5576-2.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
specs/kbd/jp106-with-scancodes.jpg
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
specs/kbd/jp106.jpg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
specs/kbd/jplaptop.jpg
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
specs/kbd/lk201-k.gif
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
specs/kbd/lk411-left.jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
specs/kbd/lk411-right.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
specs/kbd/lk411-s.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
specs/kbd/lk411.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
specs/kbd/logitech-access.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
specs/kbd/logitech-internet-s.jpg
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
specs/kbd/logitech-internet.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
specs/kbd/m24.jpg
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
specs/kbd/m24kbd.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
specs/kbd/ms_office.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
specs/kbd/ncr-s.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
specs/kbd/nokia-left.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
specs/kbd/nokia-right.jpg
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
specs/kbd/nokia-s.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
specs/kbd/nokia-top.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
specs/kbd/nokia.jpg
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
specs/kbd/samsung-s.jpg
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
specs/kbd/samsung.jpg
Normal file
|
After Width: | Height: | Size: 118 KiB |
418
specs/kbd/scancodes-1.html
Normal file
@@ -0,0 +1,418 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Keyboard scancodes</TITLE>
|
||||
<LINK HREF="scancodes-2.html" REL=next>
|
||||
|
||||
<LINK HREF="scancodes.html#toc1" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="scancodes.html#toc1">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Keyboard scancodes</A></H2>
|
||||
|
||||
<P>The data from a keyboard comes mainly in the form of scancodes,
|
||||
produced by key presses or used in the protocol with the computer.
|
||||
(
|
||||
<A HREF="scancodes-9.html#scancodesets">Different codes</A> are used by the keyboard
|
||||
firmware internally, and there also exist several
|
||||
<A HREF="scancodes-9.html#scancodesets">sets of scancodes</A>.
|
||||
Here in this section we only talk about the default codes - those from
|
||||
translated scancode set 2. Less common modes are discussed
|
||||
<A HREF="scancodes-9.html#scancodesets">below</A>.)
|
||||
Each key press and key release produces between 0 and 6 scancodes.
|
||||
<P>
|
||||
<H2><A NAME="ss1.1">1.1 Key release</A>
|
||||
</H2>
|
||||
|
||||
<P>Below I'll only mention the scancode for key press (`make').
|
||||
The scancode for key release (`break') is obtained from it
|
||||
by setting the high order bit (adding 0x80 = 128).
|
||||
Thus, Esc press produces scancode <B>01</B>, Esc release
|
||||
scancode <B>81</B> (hex).
|
||||
For sequences things are similar: Keypad-/ gives <B>e0</B> <B>35</B>
|
||||
when pressed, <B>e0</B> <B>b5</B> when released. Most keyboards will
|
||||
repeat the make code (key down code) when the key repeats. Some will also
|
||||
fake Shift down and Shift up events during the repeat.
|
||||
<P>The keys PrtSc/SysRq and Pause/Break are special.
|
||||
The former produces scancode <B>e0</B> <B>2a</B> <B>e0</B> <B>37</B>
|
||||
when no modifier key is pressed simultaneously, <B>e0</B> <B>37</B>
|
||||
together with Shift or Ctrl, but <B>54</B> together with (left or right) Alt.
|
||||
(And one gets the expected sequences upon release. But see
|
||||
<A HREF="scancodes-5.html#mtek">below</A>.)
|
||||
The latter produces scancode sequence
|
||||
<B>e1</B> <B>1d</B> <B>45</B> <B>e1</B> <B>9d</B> <B>c5</B>
|
||||
when pressed (without modifier) and nothing at all upon release.
|
||||
However, together with (left or right) Ctrl, one gets
|
||||
<B>e0</B> <B>46</B> <B>e0</B> <B>c6</B>,
|
||||
and again nothing at release. It does not repeat.
|
||||
<P>See
|
||||
<A HREF="#dellnoup">below</A> for a report on keys
|
||||
with a different behaviour.
|
||||
<P>There are many reports of laptops with badly debounced key-up events.
|
||||
Thus, unexpected key-up events should probably be regarded as not
|
||||
unusual, and be ignored. Another source of key-up events without
|
||||
preceding key-down can be the
|
||||
<A HREF="#fakeshifts">fake shift</A>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.2">1.2 Protocol scancodes</A>
|
||||
</H2>
|
||||
|
||||
<P>Most scancodes indicate a key press or release.
|
||||
Some are used in the communication protocol.
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>00</B> </TD><TD> Keyboard error - see <B>ff</B> </TD></TR><TR><TD>
|
||||
<B>aa</B> </TD><TD> BAT (Basic Assurance Test) OK </TD></TR><TR><TD>
|
||||
<B>ee</B> </TD><TD> Result of echo command </TD></TR><TR><TD>
|
||||
<B>f1</B> </TD><TD> Some keyboards, as reply to command <B>a4</B>:Password not installed </TD></TR><TR><TD>
|
||||
<B>fa</B> </TD><TD> Acknowledge from kbd </TD></TR><TR><TD>
|
||||
<B>fc</B> </TD><TD> BAT error or Mouse transmit error </TD></TR><TR><TD>
|
||||
<B>fd</B> </TD><TD> Internal failure </TD></TR><TR><TD>
|
||||
<B>fe</B> </TD><TD> Keyboard fails to ack, please resend </TD></TR><TR><TD>
|
||||
<B>ff</B> </TD><TD> Keyboard error </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Three common causes for keyboard error are:
|
||||
(i) several keys pressed simultaneously,
|
||||
(ii) keyboard buffer overflow,
|
||||
(iii) parity error on the serial line used by keyboard
|
||||
and keyboard controller for communication.
|
||||
The error reported is <B>ff</B> in
|
||||
<A HREF="scancodes-9.html#scancodesets">scancode mode</A> 1,
|
||||
and <B>00</B> in scancode modes 2 and 3.
|
||||
If translation is on, both <B>00</B> and <B>ff</B>
|
||||
are translated as <B>ff</B>.
|
||||
<P>Usually these codes have the protocol meaning. However,
|
||||
they also occur as actual scancodes, especially when
|
||||
prefixed by <B>e0</B>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.3">1.3 Escape scancodes</A>
|
||||
</H2>
|
||||
|
||||
<P>The codes <B>e0</B> and <B>e1</B> introduce scancode sequences,
|
||||
and are not usually used as isolated scancodes themselves
|
||||
(but see
|
||||
<A HREF="scancodes-6.html#e0_as_key">below</A>).
|
||||
<P>(The prefix <B>e0</B> was originally used for the grey duplicates
|
||||
of keys on the original PC/XT keyboard. These days <B>e0</B> is
|
||||
just used to expand code space. The prefix <B>e1</B> used for
|
||||
Pause/Break indicated that this key sends the make/break sequence
|
||||
at make time, and does nothing upon release.)
|
||||
<P>This, and the above, means that the values
|
||||
<B>00</B>, <B>60</B>, <B>61</B>, <B>6e</B>, <B>71</B>,
|
||||
<B>7a</B>, <B>7c</B>, <B>7e</B>, <B>7f</B>
|
||||
are unavailable to signify key presses (on a default keyboard).
|
||||
Nevertheless they also occur as scancodes, see for example the
|
||||
<A HREF="scancodes-2.html#telerate">Telerate</A> and
|
||||
<A HREF="scancodes-5.html#safeway23">Safeway SW23</A> keyboards below.
|
||||
<P>Also other prefixes occur, see
|
||||
<A HREF="scancodes-5.html#prefix_80">below</A>.
|
||||
<P>
|
||||
<A HREF="scancodes-9.html#logiteche2">Logitech</A> uses an <B>e2</B> prefix
|
||||
for the codes sent by a pointing device integrated on the keyboard.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss1.4">1.4 Ordinary scancodes</A>
|
||||
</H2>
|
||||
|
||||
<P>The scancodes in translated scancode set 2 are given in hex.
|
||||
Between parentheses the keycap on a US keyboard.
|
||||
The scancodes are given in order, grouped according
|
||||
to groups of keys that are usually found next to each other.
|
||||
<P><B>00</B> is normally an error code
|
||||
<P><B>01</B> (Esc)
|
||||
<P><B>02</B> (1!), <B>03</B> (2@), <B>04</B> (3#), <B>05</B> (4$),
|
||||
<B>06</B> (5%E), <B>07</B> (6^), <B>08</B> (7&),
|
||||
<B>09</B> (8*), <B>0a</B> (9(), <B>0b</B> (0)), <B>0c</B> (-_),
|
||||
<B>0d</B> (=+), <B>0e</B> (Backspace)
|
||||
<P><B>0f</B> (Tab), <B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
|
||||
<B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
|
||||
<B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
|
||||
<B>19</B> (P), <B>1a</B> ([{), <B>1b</B> (]})
|
||||
<P><B>1c</B> (Enter)
|
||||
<P><B>1d</B> (LCtrl)
|
||||
<P><B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D), <B>21</B> (F),
|
||||
<B>22</B> (G), <B>23</B> (H), <B>24</B> (J), <B>25</B> (K),
|
||||
<B>26</B> (L), <B>27</B> (;:), <B>28</B> ('")
|
||||
<P><B>29</B> (`~)
|
||||
<P><B>2a</B> (LShift)
|
||||
<P><B>2b</B> (\|), on a 102-key keyboard
|
||||
<P><B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C), <B>2f</B> (V),
|
||||
<B>30</B> (B), <B>31</B> (N), <B>32</B> (M), <B>33</B> (,<),
|
||||
<B>34</B> (.>), <B>35</B> (/?), <B>36</B> (RShift)
|
||||
<P><B>37</B> (Keypad-*) or (*/PrtScn) on a 83/84-key keyboard
|
||||
<P><B>38</B> (LAlt), <B>39</B> (Space bar),
|
||||
<P><B>3a</B> (CapsLock)
|
||||
<P><B>3b</B> (F1), <B>3c</B> (F2), <B>3d</B> (F3), <B>3e</B> (F4),
|
||||
<B>3f</B> (F5), <B>40</B> (F6), <B>41</B> (F7),
|
||||
<B>42</B> (F8), <B>43</B> (F9), <B>44</B> (F10)
|
||||
<P><B>45</B> (NumLock)
|
||||
<P><B>46</B> (ScrollLock)
|
||||
<P><B>47</B> (Keypad-7/Home), <B>48</B> (Keypad-8/Up),
|
||||
<B>49</B> (Keypad-9/PgUp)
|
||||
<P><B>4a</B> (Keypad--)
|
||||
<P><B>4b</B> (Keypad-4/Left), <B>4c</B> (Keypad-5),
|
||||
<B>4d</B> (Keypad-6/Right), <B>4e</B> (Keypad-+)
|
||||
<P><B>4f</B> (Keypad-1/End), <B>50</B> (Keypad-2/Down),
|
||||
<B>51</B> (Keypad-3/PgDn)
|
||||
<P><B>52</B> (Keypad-0/Ins), <B>53</B> (Keypad-./Del)
|
||||
<P><B>54</B> (Alt-SysRq) on a 84+ key keyboard
|
||||
<P><B>55</B> is less common; occurs e.g. as F11 on a Cherry G80-0777 keyboard,
|
||||
as F12 on a Telerate keyboard,
|
||||
as PF1 on a Focus 9000 keyboard, and as FN on an IBM ThinkPad.
|
||||
<P><B>56</B> mostly on non-US keyboards. It is often an unlabelled key
|
||||
<A HREF="laser.jpg">to the left</A>
|
||||
or
|
||||
<A HREF="toshiba.jpg">to the right</A>
|
||||
of the left Alt key.<BR>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="laser-s.jpg">
|
||||
</FIGURE>
|
||||
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="toshiba-s.jpg">
|
||||
</FIGURE>
|
||||
<P><B>57</B> (F11), <B>58</B> (F12) both on a 101+ key keyboard
|
||||
<P><B>59</B>-<B>5a</B>-...-<B>7f</B> are less common.
|
||||
Assignment is essentially random.
|
||||
Scancodes <B>55</B>-<B>59</B> occur as F11-F15 on the
|
||||
<A HREF="scancodes-2.html#cherry80">Cherry G80-0777</A> keyboard.
|
||||
Scancodes <B>59</B>-<B>5c</B> occur on the
|
||||
<A HREF="scancodes-5.html#RC930">RC930</A> keyboard.
|
||||
X calls <B>5d</B> `KEY_Begin'.
|
||||
Scancodes <B>61</B>-<B>64</B> occur on a
|
||||
<A HREF="scancodes-2.html#telerate">Telerate</A> keyboard.
|
||||
Scancodes <B>55</B>, <B>6d</B>, <B>6f</B>, <B>73</B>, <B>74</B>,
|
||||
<B>77</B>, <B>78</B>, <B>79</B>, <B>7a</B>, <B>7b</B>,
|
||||
<B>7c</B>, <B>7e</B> occur on the
|
||||
<A HREF="scancodes-5.html#focus">Focus 9000</A> keyboard.
|
||||
Scancodes <B>65</B>, <B>67</B>, <B>69</B>, <B>6b</B>
|
||||
occur on a
|
||||
<A HREF="scancodes-5.html#armada">Compaq Armada</A> keyboard.
|
||||
Scancodes <B>66</B>-<B>68</B>, <B>73</B> occur on the
|
||||
<A HREF="scancodes-5.html#cherry81">Cherry G81-3000</A> keyboard.
|
||||
Scancodes <B>70</B>, <B>73</B>, <B>79</B>, <B>7b</B>, <B>7d</B>
|
||||
occur on a
|
||||
<A HREF="scancodes-7.html#japanese">Japanese 86/106 keyboard</A>.
|
||||
<P>Scancodes <B>f1</B> and <B>f2</B> occur on
|
||||
<A HREF="scancodes-8.html#korean">Korean keyboards</A>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.5">1.5 Escaped scancodes</A>
|
||||
</H2>
|
||||
|
||||
<P>Apart from the Pause/Break key, that has an escaped sequence starting
|
||||
with <B>e1</B>, the escape used is <B>e0</B>. Often, the codes
|
||||
are chosen in such a way that something meaningful happens when
|
||||
the receiver just discards the <B>e0</B>.
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>e0</B> <B>1c</B> (Keypad Enter) </TD><TD></TD><TD> <B>1c</B> (Enter) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>1d</B> (RCtrl) </TD><TD></TD><TD> <B>1d</B> (LCtrl) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>2a</B> (fake LShift) </TD><TD></TD><TD> <B>2a</B> (LShift) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>35</B> (Keypad-/) </TD><TD></TD><TD> <B>35</B> (/?) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>36</B> (fake RShift) </TD><TD></TD><TD> <B>36</B> (RShift) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>37</B> (Ctrl-PrtScn) </TD><TD></TD><TD> <B>37</B> (*/PrtScn) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>38</B> (RAlt) </TD><TD></TD><TD> <B>38</B> (LAlt) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>46</B> (Ctrl-Break) </TD><TD></TD><TD> <B>46</B> (ScrollLock) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>47</B> (Grey Home) </TD><TD></TD><TD> <B>47</B> (Keypad-7/Home) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>48</B> (Grey Up) </TD><TD></TD><TD> <B>48</B> (Keypad-8/UpArrow) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>49</B> (Grey PgUp) </TD><TD></TD><TD> <B>49</B> (Keypad-9/PgUp) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>4b</B> (Grey Left) </TD><TD></TD><TD> <B>4b</B> (Keypad-4/Left) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>4d</B> (Grey Right) </TD><TD></TD><TD> <B>4d</B> (Keypad-6/Right) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>4f</B> (Grey End) </TD><TD></TD><TD> <B>4f</B> (Keypad-1/End) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>50</B> (Grey Down) </TD><TD></TD><TD> <B>50</B> (Keypad-2/DownArrow) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>51</B> (Grey PgDn) </TD><TD></TD><TD> <B>51</B> (Keypad-3/PgDn) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>52</B> (Grey Insert) </TD><TD></TD><TD> <B>52</B> (Keypad-0/Ins) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>53</B> (Grey Delete) </TD><TD></TD><TD> <B>53</B> (Keypad-./Del) </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>These escaped scancodes occur only on 101+ key keyboards.
|
||||
The
|
||||
<A HREF="scancodes-5.html#microsoft">Microsoft keyboard</A> adds
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>e0</B> <B>5b</B> (LeftWindow) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>5c</B> (RightWindow) </TD></TR><TR><TD>
|
||||
<B>e0</B> <B>5d</B> (Menu) </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Other escaped scancodes occur - see below under the individual keyboards.
|
||||
<P>
|
||||
<H2><A NAME="fakeshifts"></A> <A NAME="ss1.6">1.6 Fake shifts</A>
|
||||
</H2>
|
||||
|
||||
<P>The ten grey keys Insert, Home, PgUp, Delete, End, PgDn,
|
||||
Up, Left, Down, Right are supposed to function regardless
|
||||
of the state of Shift and NumLock keys. But for an old AT keyboard
|
||||
the keypad keys would produce digits when Numlock was on or Shift
|
||||
was down. Therefore, in order to fool old programs,
|
||||
fake scancodes are sent: when LShift is down, and Insert is
|
||||
pressed, <B>e0</B> <B>aa</B> <B>e0</B> <B>52</B> is sent;
|
||||
upon release of Insert <B>e0</B> <B>d2</B> <B>e0</B> <B>2a</B>
|
||||
is sent. In other words, a fake LShift-up and
|
||||
fake LShift-down are inserted.
|
||||
<P>If the Shift key is released earlier than the repeated key,
|
||||
then a real Shift-up code occurs (without preceding fake Shift-down)
|
||||
so that a program ignoring <B>e0</B> would see one more Shift-up
|
||||
than Shift-down.
|
||||
<P>When NumLock is on, no fake Shifts are sent when Shift was down,
|
||||
but fake Shifts are sent when Shift was not down. Thus,
|
||||
with Numlock, if Insert is pressed,
|
||||
<B>e0</B> <B>2a</B> <B>e0</B> <B>52</B> is sent
|
||||
and upon release <B>e0</B> <B>d2</B> <B>e0</B> <B>aa</B> is sent.
|
||||
The keyboard maintains a private NumLock mode, toggled when
|
||||
NumLock is pressed, and set when the NumLock LED is set.
|
||||
<P>In the same way, when Shift is down, the Grey-/ key produces
|
||||
fake Shift-up and fake Shift-down sequences. However, it does
|
||||
not react to the state of NumLock. The purpose of course is to
|
||||
fool programs that identify Grey-/ with ordinary /, so that they
|
||||
don't treat Shift-Grey-/ like Shift-/, i.e., ?.
|
||||
<P>On a Toshiba notebook, the three Windows keys are treated like
|
||||
the group of ten keys mentioned, and get fake shifts when
|
||||
(left or right) Shift is down. They do not react to NumLock.
|
||||
<P>
|
||||
<H2><A NAME="ss1.7">1.7 Added non-fake shifts</A>
|
||||
</H2>
|
||||
|
||||
<P>On my 121-key
|
||||
<A HREF="scancodes-5.html#nokia">Nokia Data</A> keyboard there are
|
||||
function keys F1, ..., F24, where F1, ..., F12 send the expected codes
|
||||
<B>3b</B>, ..., <B>58</B>, and F13, ..., F24 send the same codes
|
||||
together with the LShift code <B>2a</B>.
|
||||
Thus, F13 gives <B>2a</B> <B>3b</B> on press,
|
||||
and <B>bb</B> <B>aa</B> on release.
|
||||
Similarly, there are keys with added LCtrl code <B>1d</B>.
|
||||
But there are also keys with added fake shifts <B>e0 2a</B>.
|
||||
<P>
|
||||
<A HREF="http://www.delorie.com/djgpp/doc/rbinter/it/06/0.html">Delorie</A>
|
||||
reports that <I>the "Preh Commander AT" keyboard with additional F11-F22 keys
|
||||
treats F11-F20 as Shift-F1..Shift-F10 and F21/F22 as Ctrl-F1/Ctrl-F2; the
|
||||
Eagle PC-2 keyboard with F11-F24 keys treats those additional keys
|
||||
in the same way</I>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.8">1.8 Turbo Mode</A>
|
||||
</H2>
|
||||
|
||||
<P>On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
|
||||
switch Turbo mode on/off, respectively. For these, the motherboard
|
||||
may generate the same scancode sequence when the Turbo button is
|
||||
pushed: Turbo Switch (High->Low):
|
||||
<B>1d</B> <B>38</B> <B>4a</B> <B>ce</B> <B>b8</B> <B>9d</B>
|
||||
and Turbo Switch (Low->High):
|
||||
<B>1d</B> <B>38</B> <B>4e</B> <B>ce</B> <B>b8</B> <B>9d</B>.
|
||||
<P>Other peculiar combinations in this style include
|
||||
LCtrl-LAlt-LShift-GreyMinus and LCtrl-LAlt-LShift-GreyPlus to turn
|
||||
system cache off/on.
|
||||
<P>If Green PC system power saving mode is enabled in AMIBIOS Setup,
|
||||
the AMI MegaKey keyboard controller recognizes the combinations
|
||||
Ctrl-Alt-\ (put the system into immediate power down mode),
|
||||
Ctrl-Alt-[ (disable the Green PC power savings mode temporarily),
|
||||
Ctrl-Alt-] (enables the Green PC power down mode).
|
||||
<P>Thio Yu Jin <<CODE>jin@singmail.com</CODE>> complains that on his Toshiba 4010CDS
|
||||
the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual.
|
||||
(04 Mar 1999 - not April 1.)
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="power"></A> <A NAME="ss1.9">1.9 Power Saving</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<A HREF="http://www.microsoft.com/hwdev/tech/input/Scancode.asp">Microsoft</A> recommends: "i8042-based keyboards should deploy the
|
||||
following scan codes for power management buttons, i.e., POWER and SLEEP
|
||||
buttons:
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
</TD><TD> Set-1 make/break </TD><TD> Set-2 make/break </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
Power </TD><TD> <B>e0</B> <B>5e</B> / <B>e0</B> <B>de</B> </TD><TD><B>e0</B> <B>37</B> / <B>e0</B> <B>f0</B> <B>37</B> </TD></TR><TR><TD>
|
||||
Sleep </TD><TD> <B>e0</B> <B>5f</B> / <B>e0</B> <B>df</B> </TD><TD><B>e0</B> <B>3f</B> / <B>e0</B> <B>f0</B> <B>3f</B> </TD></TR><TR><TD>
|
||||
Wake </TD><TD> <B>e0</B> <B>63</B> / <B>e0</B> <B>e3</B> </TD><TD><B>e0</B> <B>5e</B> / <B>e0</B> <B>f0</B> <B>5e</B> </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>The Power, Sleep, and Wake event scan codes are the i8042 equivalents
|
||||
to the System Power Down, System Sleep, and System Wake Up HID usages".
|
||||
<P>Many keyboards have Power/Sleep/Wake keys that have to be
|
||||
activated by a fourth key (unlabeled, or labeled FN): pressing
|
||||
one of these four keys does not produce any scancodes, but
|
||||
when the FN key is pressed simultaneously, the Power/Sleep/Wake
|
||||
keys give the codes listed above.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss1.10">1.10 Initializing special keyboards</A>
|
||||
</H2>
|
||||
|
||||
<P>Many keyboards have more keys and buttons than the standard ones.
|
||||
Sometimes these additional keys produce scancode combinations
|
||||
that were unused before. But on other keyboard such additional
|
||||
keys do not produce any code at all, until some initializing
|
||||
action is taken.
|
||||
<P>Sometimes that action consists of writing some bytes to keyboard
|
||||
registers. See, for example, the
|
||||
<A HREF="scancodes-5.html#rapidinit">IBM Rapid Access keyboard</A>, and the
|
||||
<A HREF="scancodes-5.html#omnibookinit">Omnibook keyboard</A>.
|
||||
<P>
|
||||
<H2><A NAME="LEDmanip"></A> <A NAME="ss1.11">1.11 Manipulating extra LEDs</A>
|
||||
</H2>
|
||||
|
||||
<P>Some keyboards have additional LEDs, and in a few cases we know
|
||||
how to manipulate those.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#chicony">Chicony keyboard</A> needs command sequences
|
||||
<B>eb</B> <B>00</B> <I>xy</I>, with
|
||||
<I>xy</I> = <B>01</B> for the Moon LED and
|
||||
<I>xy</I> = <B>02</B> for the zzZ LED.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#EZButton">IBM EZ Button keyboard</A> needs
|
||||
command sequences <B>eb</B> <B>00</B> <I>xy</I>, with
|
||||
<I>xy</I> = <B>01</B> for the Msg LED,
|
||||
<I>xy</I> = <B>02</B> for the CD LED,
|
||||
<I>xy</I> = <B>04</B> for the Power LED,
|
||||
<I>xy</I> = <B>10</B> for the Talk LED, and
|
||||
<I>xy</I> = <B>20</B> for the Message Waiting LED.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#ibmrapidaccess">IBM Rapid Access keyboard</A> needs
|
||||
command sequences <B>eb</B> <B>00</B> <I>xy</I>, with
|
||||
<I>xy</I> = <B>04</B> for the Suspend LED and
|
||||
<I>xy</I> = <B>20</B> for the Mute LED.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#ibmrapidaccessii">IBM Rapid Access keyboard II</A> needs
|
||||
the command sequences <B>eb</B> <B>71</B> and <B>eb</B> <B>70</B>
|
||||
to switch the Standby LED on and off.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#logitechinternet">Logitech Internet Keyboard</A>
|
||||
has an additional amber LED. It is turned on by sending <B>eb</B>,
|
||||
and then blinks about once a second. It is turned off again by <B>ec</B>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.12">1.12 The laptop FN key</A>
|
||||
</H2>
|
||||
|
||||
<P>Laptops have no room for all nonsensical keys one usually find
|
||||
on a regular keyboard. So, the number pad and other keys are
|
||||
folded into the main part of the keyboard. A key without label,
|
||||
or labelled FN is often used to modify the meaning of other keys.
|
||||
This FN does not produce scancodes itself, it only modifies the
|
||||
scancodes produced by other keys.
|
||||
<P>
|
||||
<A NAME="dellnoup"></A>
|
||||
Neil Brown reports about his Dell Latitude D800 laptop that it has
|
||||
five key combinations that do not produce proper break codes.
|
||||
The five combinations FN+F2, FN+F3, FN+F10, FN+Down, FN+Up
|
||||
(labelled Wireless, Brighter, Darker, Battery, CDEject)
|
||||
produce make codes <B>e0</B> <B>08</B>, <B>e0</B> <B>07</B>,
|
||||
<B>e0</B> <B>09</B>, <B>e0</B> <B>05</B>, <B>e0</B> <B>06</B>,
|
||||
respectively. The first three do not produce any break code.
|
||||
The last two have a break code that is identical to the make code.
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="scancodes.html#toc1">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
805
specs/kbd/scancodes-10.html
Normal file
@@ -0,0 +1,805 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: The AT keyboard controller</TITLE>
|
||||
<LINK HREF="scancodes-11.html" REL=next>
|
||||
<LINK HREF="scancodes-9.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc10" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-11.html">Next</A>
|
||||
<A HREF="scancodes-9.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc10">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s10">10. The AT keyboard controller</A></H2>
|
||||
|
||||
<P>A user program can talk to the keyboard controller on the motherboard.
|
||||
The keyboard controller can again talk to the keyboard.
|
||||
<P>When a key is pressed the keyboard sends the corresponding
|
||||
keyboard scancode to the keyboard controller, and the keyboard controller
|
||||
translates that and interrupts the CPU, allowing the CPU to read the result.
|
||||
<P>More detailed: when a key is pressed, the keyboard sends
|
||||
a start bit (low), followed by 8 data bits for the keyboard scancode
|
||||
of the key (least significant first), followed by an odd parity bit,
|
||||
followed by a stop bit (high).
|
||||
The keyboard controller reads the data and checks the parity.
|
||||
If incorrect, retransmission is requested. If incorrect again
|
||||
a parity error is reported.
|
||||
If the time between request to send and start of transmission is greater
|
||||
than 15 ms, or if the eleven bits are not received within 2ms,
|
||||
a timeout is reported.
|
||||
In both cases (parity error or timeout), the data byte is set to 0xff.
|
||||
<P>The keyboard controller has three 8-bit registers involved in
|
||||
communication with the CPU: its input buffer, that can be written
|
||||
by the CPU by writing port 0x60 or port 0x64; its output buffer,
|
||||
that can be read by the CPU by reading from port 0x60; and the
|
||||
status register, that can be read by the CPU by reading from port 0x64.
|
||||
<P>If the CPU writes to port 0x64, the byte is interpreted as a command byte.
|
||||
If the CPU writes to port 0x60, the byte is interpreted as a data byte.
|
||||
<P>The keyboard controller has two 8-bit I/O ports involved in
|
||||
communication with the keyboard: the
|
||||
<A HREF="#inputport">input port</A> P1 (receiving input from the keyboard)
|
||||
and the
|
||||
<A HREF="#outputport">output port</A> P2 (for sending output
|
||||
to the keyboard).
|
||||
<P>
|
||||
<H2><A NAME="ss10.1">10.1 The keyboard controller status register</A>
|
||||
</H2>
|
||||
|
||||
<P>The keyboard controller has an 8-bit status register.
|
||||
It can be inspected by the CPU by reading port 0x64.
|
||||
<P>(Typically, it has the value 0x14: keyboard not locked, self-test completed.)
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<A HREF="#kcPARE">PARE</A> </TD><TD>
|
||||
<A HREF="#kcTIM">TIM</A> </TD><TD>
|
||||
<A HREF="#kcAUXB">AUXB</A> </TD><TD>
|
||||
<A HREF="#kcKEYL">KEYL</A> </TD><TD>
|
||||
<A HREF="#kcCD">C/D</A> </TD><TD>
|
||||
<A HREF="#kcSYSF">SYSF</A> </TD><TD>
|
||||
<A HREF="#kcINPB">INPB</A> </TD><TD>
|
||||
<A HREF="#kcOUTB">OUTB</A> </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P><I>Bit 7:
|
||||
<A NAME="kcPARE"></A> Parity error</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: OK.
|
||||
1: Parity error with last byte.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 6:
|
||||
<A NAME="kcTIM"></A> Timeout</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: OK.
|
||||
1: Timeout.
|
||||
On PS/2 systems: General timeout.
|
||||
On AT systems: Timeout on transmission from keyboard to keyboard controller.
|
||||
Possibly parity error (in which case both bits 6 and 7 are set).
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 5:
|
||||
<A NAME="kcAUXB"></A> Auxiliary output buffer full</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On PS/2 systems:
|
||||
Bit 0 tells whether a read from port 0x60 will be valid.
|
||||
If it is valid, this bit 5 tells what data will be read from port 0x60.
|
||||
0: Keyboard data. 1: Mouse data.
|
||||
<P>On AT systems:
|
||||
0: OK.
|
||||
1: Timeout on transmission from keyboard controller to keyboard.
|
||||
This may indicate that no keyboard is present.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 4:
|
||||
<A NAME="kcKEYL"></A> Keyboard lock</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Locked.
|
||||
1: Not locked.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 3:
|
||||
<A NAME="kcCD"></A> Command/Data</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Last write to input buffer was data (written via port 0x60).
|
||||
1: Last write to input buffer was a command (written via port 0x64).
|
||||
(This bit is also referred to as Address Line A2.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 2:
|
||||
<A NAME="kcSYSF"></A> System flag</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Set to 0 after power on reset.
|
||||
Set to 1 after successful completion of the keyboard controller self-test
|
||||
(Basic Assurance Test, BAT).
|
||||
Can also be set by command (see
|
||||
<A HREF="#kccb2">below</A>).
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 1:
|
||||
<A NAME="kcINPB"></A> Input buffer status</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Input buffer empty, can be written.
|
||||
1: Input buffer full, don't write yet.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 0:
|
||||
<A NAME="kcOUTB"></A> Output buffer status</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Output buffer empty, don't read yet.
|
||||
1: Output buffer full, can be read.
|
||||
(In the PS/2 situation bit 5 tells whether the available data is
|
||||
from keyboard or mouse.)
|
||||
This bit is cleared when port 0x60 is read.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="commandbyte"></A> <A NAME="ss10.2">10.2 The keyboard controller command byte</A>
|
||||
</H2>
|
||||
|
||||
<P>The keyboard controller is provided with some RAM, for example 32 bytes,
|
||||
that can be accessed by the CPU. The most important part of this RAM is
|
||||
byte 0, the Controller Command Byte (CCB). It can be read/written by
|
||||
writing 0x20/0x60 to port 0x64 and then reading/writing a data byte
|
||||
from/to port 0x60.
|
||||
<P>This byte has the following layout.
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<A HREF="#kccb7">0</A> </TD><TD>
|
||||
<A HREF="#kccb6">XLATE</A> </TD><TD>
|
||||
<A HREF="#kccb5">ME</A> </TD><TD>
|
||||
<A HREF="#kccb4">KE</A> </TD><TD>
|
||||
<A HREF="#kccb3">IGNLK</A> </TD><TD>
|
||||
<A HREF="#kccb2">SYSF</A> </TD><TD>
|
||||
<A HREF="#kccb1">MIE</A> </TD><TD>
|
||||
<A HREF="#kccb0">KIE</A> </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P><I>Bit 7:
|
||||
<A NAME="kccb7"></A> Unused</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Always 0.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 6:
|
||||
<A NAME="kccb6"></A> Translate</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: No translation.
|
||||
1: Translate keyboard scancodes, using the
|
||||
<A HREF="scancodes-9.html#translationtable">translation table</A> given above.
|
||||
MCA type 2 controllers cannot set this bit to 1. In this case
|
||||
scan code conversion is set using keyboard command 0xf0 to port 0x60.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 5:
|
||||
<A NAME="kccb5"></A> Mouse enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On an EISA or PS/2 system: 0: Enable mouse. 1: Disable mouse
|
||||
by driving the clock line low.
|
||||
On an ISA system: "PC Mode": 0: use 11-bit codes, check parity and do
|
||||
scan conversion.
|
||||
1: use 8086 codes, don't check parity and don't do scan conversion.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 4:
|
||||
<A NAME="kccb4"></A> Keyboard enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Enable keyboard. 1: Disable keyboard
|
||||
by driving the clock line low.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 3:
|
||||
<A NAME="kccb3"></A> Ignore keyboard lock</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
For PS/2: Unused, always 0.
|
||||
For AT:
|
||||
0: No action. 1: Force
|
||||
<A HREF="#kcKEYL">bit 4</A> of the status register
|
||||
to 1, "not locked". This is used for keyboard testing after power on.
|
||||
Maybe only on older motherboards.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 2:
|
||||
<A NAME="kccb2"></A> System flag</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This bit is shown in
|
||||
<A HREF="#kcSYSF">bit 2</A> of the status register.
|
||||
A "cold reboot" is one with this bit set to zero.
|
||||
A "warm reboot" is one with this bit set to one (BAT already completed).
|
||||
This will influence the tests and initializations done by the POST.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 1:
|
||||
<A NAME="kccb1"></A> Mouse interrupt enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On an ISA system: unused, always 0. On an EISA or PS/2 system:
|
||||
0: Do not use mouse interrupts.
|
||||
1: Send interrupt request IRQ12 when the mouse output buffer is full.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Bit 0:
|
||||
<A NAME="kccb0"></A> Keyboard interrupt enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
0: Do not use keyboard interrupts.
|
||||
1: Send interrupt request IRQ1 when the keyboard output buffer is full.
|
||||
<P>When no interrupts are used, the CPU has to poll bits 0 (and 5)
|
||||
of the status register.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="ss10.3">10.3 Keyboard controller commands</A>
|
||||
</H2>
|
||||
|
||||
<P>The CPU can command the keyboard controller by writing port 0x64.
|
||||
Useful, generally available, keyboard commands are:
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc20">20</A></B> </TD><TD> Read keyboard controller command byte </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc60">60</A></B> </TD><TD> Write keyboard controller command byte </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccaa">aa</A></B> </TD><TD> Self test </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccab">ab</A></B> </TD><TD> Interface test </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccad">ad</A></B> </TD><TD> Disable keyboard </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccae">ae</A></B> </TD><TD> Enable keyboard </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccc0">c0</A></B> </TD><TD> Read input port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccd0">d0</A></B> </TD><TD> Read output port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccd1">d1</A></B> </TD><TD> Write output port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcce0">e0</A></B> </TD><TD> Read test inputs </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccfe">fe</A></B> </TD><TD> System reset </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Useful, generally available, mouse commands are:
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca7">a7</A></B> </TD><TD> Disable mouse port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca8">a8</A></B> </TD><TD> Enable mouse port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca9">a9</A></B> </TD><TD> Test mouse port </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccd4">d4</A></B> </TD><TD> Write to mouse </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Obscure, probably obsolete, commands:
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc00">00-1f</A></B> </TD><TD> Read keyboard controller RAM </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc20">20-3f</A></B> </TD><TD> Read keyboard controller RAM </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc40">40-5f</A></B> </TD><TD> Write keyboard controller RAM </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc60">60-7f</A></B> </TD><TD> Write keyboard controller RAM </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc90">90-93</A></B> </TD><TD> Synaptics multiplexer prefix </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcc90via">90-9f</A></B> </TD><TD> Write Port13-Port10 </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca0">a0</A></B> </TD><TD> Read copyright </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca1">a1</A></B> </TD><TD> Read firmware version </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca2">a2</A></B> </TD><TD> Switch speed </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca3">a3</A></B> </TD><TD> Switch speed </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca4">a4</A></B> </TD><TD> Check if password installed </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca5">a5</A></B> </TD><TD> Load password </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcca6">a6</A></B> </TD><TD> Check password </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccac">ac</A></B> </TD><TD> Diagnostic dump </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccaf">af</A></B> </TD><TD> Read keyboard version </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccb0">b0-b5</A></B> </TD><TD> Reset keyboard controller line </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccb8">b8-bd</A></B> </TD><TD> Set keyboard controller line </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccc1">c1</A></B> </TD><TD> Continuous input port poll, low </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccc2">c2</A></B> </TD><TD> Continuous input port poll, high </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccc8">c8</A></B> </TD><TD> Unblock lines P22 and P23 </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccc9">c9</A></B> </TD><TD> Block lines P22 and P23 </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccca">ca</A></B> </TD><TD> Read keyboard controller mode </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kcccb">cb</A></B> </TD><TD> Write keyboard controller mode </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccd2">d2</A></B> </TD><TD> Write keyboard output buffer </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccd3">d3</A></B> </TD><TD> Write mouse output buffer </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccdd">dd</A></B> </TD><TD> Disable A20 address line </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccdf">df</A></B> </TD><TD> Enable A20 address line </TD></TR><TR><TD>
|
||||
<B>
|
||||
<A HREF="#kccf0">f0-ff</A></B> </TD><TD> Pulse output bit </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P><I>Command 0x00-0x1f:
|
||||
<A NAME="kcc00"></A> Read keyboard controller RAM</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(AMIBIOS only) Aliases for 0x20-0x3f.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0x20-0x3f:
|
||||
<A NAME="kcc20"></A> Read keyboard controller RAM</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
The last six bits of the command specify the RAM address to read.
|
||||
The read data is placed into the output buffer, and can be read
|
||||
by reading port 0x60.
|
||||
On MCA systems, type 1 controllers can access all 32 locations;
|
||||
type 2 controllers can only access locations 0, 0x13-0x17, 0x1d, 0x1f.
|
||||
<P>Location 0 is the
|
||||
<A HREF="#commandbyte">Command byte</A>, see above.
|
||||
<P>Location 0x13 (on MCA) is nonzero when a password is enabled.
|
||||
<P>Location 0x14 (on MCA) is nonzero when the password was matched.
|
||||
<P>Locations 0x16-0x17 (on MCA) give two make codes to be discarded
|
||||
during password matching.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0x40-0x5f:
|
||||
<A NAME="kcc40"></A> Write keyboard controller RAM</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(AMIBIOS only) Aliases for 0x40-0x5f.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0x60-0x7f:
|
||||
<A NAME="kcc60"></A> Write keyboard controller RAM</I>
|
||||
<P>
|
||||
<P><I>Command 0x90-0x93:
|
||||
<A NAME="kcc90"></A> Synaptics routing prefixes</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Prefix a PS/2 mouse command with one of these to talk to one of at most four
|
||||
multiplexed devices. See also the
|
||||
<A HREF="#multiplexing">multiplexing handshake</A> below.
|
||||
<P>Unfortunately, VIA also uses this command:
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0x90-0x9f:
|
||||
<A NAME="kcc90via"></A> Write Port13-Port10</I>
|
||||
<BLOCKQUOTE>
|
||||
(VIA VT82C42) Write low nibble to Port13-Port10.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa0:
|
||||
<A NAME="kcca0"></A> Read copyright</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On some keyboard controllers: an ASCIZ copyright string
|
||||
(possibly just NUL) is made available for reading via port 0x60.
|
||||
On other systems: no effect, the command is ignored.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa1:
|
||||
<A NAME="kcca1"></A> Read controller firmware version</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On some keyboard controllers: a single ASCII byte is made available
|
||||
for reading via port 0x60.
|
||||
On other systems: no effect, the command is ignored.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa2:
|
||||
<A NAME="kcca2"></A> Switch speed</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(On ISA/EISA systems with AMI BIOS)
|
||||
Reset keyboard controller lines P22 and P23 low.
|
||||
These lines can be used for speed switching via the keyboard controller.
|
||||
When done, the keyboard controller sends one garbage byte to the system.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa3:
|
||||
<A NAME="kcca3"></A> Switch speed</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(On ISA/EISA systems with AMI BIOS)
|
||||
Set keyboard controller lines P22 and P23 high.
|
||||
These lines can be used for speed switching via the keyboard controller.
|
||||
When done, the keyboard controller sends one garbage byte to the system.
|
||||
<P>(Compaq BIOS: Enable system speed control.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa4:
|
||||
<A NAME="kcca4"></A> Check if password installed</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA systems:
|
||||
Return 0xf1 (via port 0x60) when no password is installed,
|
||||
return 0xfa when a password has been installed.
|
||||
Some systems without password facility always return 0xf1.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Write Clock = Low.
|
||||
<P>(Compaq BIOS: toggle speed.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa5:
|
||||
<A NAME="kcca5"></A> Load password</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA systems:
|
||||
Load a password by writing a NUL-terminated string to port 0x60.
|
||||
The string is in scancode format.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Write Clock = High.
|
||||
<P>(Compaq BIOS: special read of P2, with bits 4 and 5 replaced:
|
||||
Bit 5: 0: 9-bit keyboard, 1: 11-bit keyboard.
|
||||
Bit 4: 0: outp-buff-full interrupt disabled, 1: enabled.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa6:
|
||||
<A NAME="kcca6"></A> Check password</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA systems:
|
||||
When a password is installed:
|
||||
Check password by matching keystrokes with the stored password.
|
||||
Enable keyboard upon successful match.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Read Clock. 0: Low. 1: High.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa7:
|
||||
<A NAME="kcca7"></A> Disable mouse port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA systems: disable the mouse (auxiliary device)
|
||||
by setting its clock line low, and set
|
||||
<A HREF="#kccb5">bit 5</A>
|
||||
of the
|
||||
<A HREF="#commandbyte">Command byte</A>. Now P23 = 1.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Write Cache Bad.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa8:
|
||||
<A NAME="kcca8"></A> Enable mouse port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA systems: enable the mouse (auxiliary device),
|
||||
clear
|
||||
<A HREF="#kccb5">bit 5</A> of the
|
||||
<A HREF="#commandbyte">Command byte</A>. Now P23 = 0.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Write Cache Good.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xa9:
|
||||
<A NAME="kcca9"></A> Test mouse port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
On MCA and other systems: test the serial<61>link between
|
||||
keyboard controller and mouse. The result can be read from port 0x60.
|
||||
0: OK.
|
||||
1: Mouse clock line stuck low.
|
||||
2: Mouse clock line stuck high.
|
||||
3: Mouse data line stuck low.
|
||||
4: Mouse data line stuck high.
|
||||
0xff: No mouse.
|
||||
<P>(On ISA/EISA systems with AMI BIOS)
|
||||
Read Cache Bad or Good. 0: Bad. 1: Good.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xaa:
|
||||
<A NAME="kccaa"></A> Self test</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Perform self-test. Return 0x55 if OK, 0xfc if NOK.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xab:
|
||||
<A NAME="kccab"></A> Interface test</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Test the serial link between keyboard controller and keyboard.
|
||||
The result can be read from port 0x60.
|
||||
0: OK.
|
||||
1: Keyboard clock line stuck low.
|
||||
2: Keyboard clock line stuck high.
|
||||
3: Keyboard data line stuck low.
|
||||
4: Keyboard data line stuck high.
|
||||
0xff: General error.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xac:
|
||||
<A NAME="kccac"></A> Diagnostic dump</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(On some systems)
|
||||
Read from port 0x60 sixteen bytes of keyboard controller RAM,
|
||||
and the output and input ports and the controller's program status word.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xad:
|
||||
<A NAME="kccad"></A> Disable keyboard</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Disable the keyboard clock line and set
|
||||
<A HREF="#kccb5">bit 4</A>
|
||||
of the
|
||||
<A HREF="#commandbyte">Command byte</A>.
|
||||
Any keyboard command enables the keyboard again.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xae:
|
||||
<A NAME="kccae"></A> Enable keyboard</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Enable the keyboard clock line and clear
|
||||
<A HREF="#kccb5">bit 4</A>
|
||||
of the
|
||||
<A HREF="#commandbyte">Command byte</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xaf:
|
||||
<A NAME="kccaf"></A> Read keyboard version</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(Award BIOS, VIA)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xb0-0xb5,0xb8-0xbd:
|
||||
<A NAME="kccb0"></A> <A NAME="kccb8"></A> Reset/set keyboard controller line</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
AMI BIOS:
|
||||
Commands 0xb0-0xb5 reset a keyboard controller line low.
|
||||
Commands 0xb8-0xbd set the corresponding keyboard controller line high.
|
||||
The lines are P10, P11, P12, P13, P22 and P23, respectively.
|
||||
(In the case of the lines P10, P11, P22, P23 this is on ISA/EISA systems only.)
|
||||
When done, the keyboard controller sends one garbage byte to the system.
|
||||
<P>VIA BIOS:
|
||||
Commands 0xb0-0xb7 write 0 to lines P10, P11, P12, P13, P22, P23, P14, P15.
|
||||
Commands 0xb8-0xbf write 1 to lines P10, P11, P12, P13, P22, P23, P14, P15.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xc0:
|
||||
<A NAME="kccc0"></A> Read input port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Read the
|
||||
<A HREF="#inputport">input port</A> (P1),
|
||||
and make the resulting byte available to be read from port 0x60.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xc1:
|
||||
<A NAME="kccc1"></A> Continuous input port poll, low</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(MCA systems with type 1 controller only)
|
||||
Continuously copy bits 3-0 of the input port to be read from bits 7-4
|
||||
of port 0x64, until another keyboard controller command is received.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xc2:
|
||||
<A NAME="kccc2"></A> Continuous input port poll, high</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(MCA systems with type 1 controller only)
|
||||
Continuously copy bits 7-4 of the input port to be read from bits 7-4
|
||||
of port 0x64, until another keyboard controller command is received.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xc8:
|
||||
<A NAME="kccc8"></A> Unblock keyboard controller lines P22 and P23</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(On ISA/EISA systems with AMI BIOS)
|
||||
After this command, the system can make lines P22 and P23 low/high
|
||||
using
|
||||
<A HREF="#kccd1">command 0xd1</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xc9:
|
||||
<A NAME="kccc9"></A> Block keyboard controller lines P22 and P23</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(On ISA/EISA systems with AMI BIOS)
|
||||
After this command, the system cannot make lines P22 and P23 low/high
|
||||
using
|
||||
<A HREF="#kccd1">command 0xd1</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xca:
|
||||
<A NAME="kccca"></A> Read keyboard controller mode</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(AMI BIOS, VIA)
|
||||
Read keyboard controller mode to bit 0 of port 0x60.
|
||||
0: ISA (AT) interface.
|
||||
1: PS/2 (MCA)interface.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xcb:
|
||||
<A NAME="kcccb"></A> Write keyboard controller mode</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(AMI BIOS)
|
||||
Write keyboard controller mode to bit 0 of port 0x60.
|
||||
0: ISA (AT) interface.
|
||||
1: PS/2 (MCA)interface.
|
||||
(First read the mode using command 0xca, then modify only
|
||||
the last bit, then write the mode using this command.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xd0:
|
||||
<A NAME="kccd0"></A> Read output port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Read the
|
||||
<A HREF="#outputport">output port</A> (P2)
|
||||
and place the result in the output buffer.
|
||||
Use only when output buffer is empty.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xd1:
|
||||
<A NAME="kccd1"></A> Write output port</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Write the
|
||||
<A HREF="#outputport">output port</A> (P2).
|
||||
Note that writing a 0 in bit 0 will cause a hardware reset.
|
||||
<P>(Compaq: the system speed bits are not set. Use commands 0xa1-0xa6 for that.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xd2:
|
||||
<A NAME="kccd2"></A> Write keyboard output buffer</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(MCA)
|
||||
Write the keyboard controllers output buffer with the byte
|
||||
next written to port 0x60, and act as if this was keyboard data.
|
||||
(In particular, raise IRQ1 when
|
||||
<A HREF="#kccb0">bit 0</A>
|
||||
of the
|
||||
<A HREF="#commandbyte">Command byte</A> says so.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xd3:
|
||||
<A NAME="kccd3"></A> Write mouse output buffer</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(MCA)
|
||||
Write the keyboard controllers output buffer with the byte
|
||||
next written to port 0x60, and act as if this was mouse data.
|
||||
(In particular, raise IRQ12 when
|
||||
<A HREF="#kccb1">bit 1</A>
|
||||
of the
|
||||
<A HREF="#commandbyte">Command byte</A> says so.)
|
||||
<P>Not all systems support this.
|
||||
<P><B>
|
||||
<A NAME="multiplexing"></A> Synaptics multiplexing</B>
|
||||
On the other hand, Synaptics (see
|
||||
<A HREF="http://www.synaptics-uk.com/decaf/utilities/ps2-mux.PDF">ps2-mux.PDF</A>)
|
||||
uses this command as a handshake between driver and controller:
|
||||
if the driver gives this command three times, with data bytes
|
||||
0xf0, 0x56, 0xa4 respectively, and reads 0xf0, 0x56, but not 0xa4
|
||||
back from the mouse output buffer, then the driver knows that the
|
||||
controller supports Synaptics AUX port multiplexing, and the controller
|
||||
knows that it does not have to do the usual data faking and goes
|
||||
into multiplexed mode. The third byte read is the version of the
|
||||
Synaptics standard.
|
||||
<P>There is a corresponding deactivation sequence, namely
|
||||
0xf0, 0x56, 0xa5. (And again the last byte is changed to the
|
||||
version number of the standard supported.)
|
||||
This latter sequence works both in multiplexed mode and in legacy mode
|
||||
and can thus be used to determine whether this feature is present
|
||||
without activating it.
|
||||
<P>See also the multiplexer commands
|
||||
<A HREF="#kcc90">0x90-0x93</A>.
|
||||
<P>For some laptops it has been reported that bit 3 of every third
|
||||
mouse byte is forced to 1 (as it would be with the standard
|
||||
3-byte mouse packets). This may turn 0xf0, 0x56, 0xa4 into
|
||||
0xf0, 0x56, 0xac and cause misdetection of Synaptics multiplexing
|
||||
(for version 10.12).
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xd4:
|
||||
<A NAME="kccd4"></A> Write to mouse</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(MCA)
|
||||
The byte next written to port 0x60 is transmitted to the mouse.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xdd:
|
||||
<A NAME="kccdd"></A> Disable A20 address line</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(HP Vectra)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xdf:
|
||||
<A NAME="kccdf"></A> Enable A20 address line</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(HP Vectra)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xe0:
|
||||
<A NAME="kcce0"></A> Read test inputs</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command makes the status of the
|
||||
<A HREF="#testinputs">Test inputs</A> T0 and T1 available
|
||||
to be read via port 0x60 in bits 0 and 1, respectively.
|
||||
Use only when the output port is empty.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<P><I>Command 0xf0-0xff:
|
||||
<A NAME="kccf0"></A> Pulse output bit</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Bits 3-0 of the
|
||||
<A HREF="#outputport">output port</A> P2
|
||||
of the keyboard controller may be pulsed low for approximately 6 <20>seconds.
|
||||
Bits 3-0 of this command specify the output port bits to be pulsed.
|
||||
0: Bit should be pulsed.
|
||||
1: Bit should not be modified.
|
||||
The only useful version of this command is Command 0xfe.
|
||||
(For MCA, replace 3-0 by 1-0 in the above.)
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command 0xfe:
|
||||
<A NAME="kccfe"></A> System reset</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Pulse bit 0 of the
|
||||
<A HREF="#outputport">output port</A> P2
|
||||
of the keyboard controller. This will reset the CPU.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="inputport"></A> <A NAME="ss10.4">10.4 The input port P1</A>
|
||||
</H2>
|
||||
|
||||
<P>This has the following layout.
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
bit 7 </TD><TD> Keyboard lock </TD><TD> 0: locked, 1: not locked </TD></TR><TR><TD>
|
||||
bit 6 </TD><TD> Display </TD><TD> 0: CGA, 1: MDA </TD></TR><TR><TD>
|
||||
bit 5 </TD><TD> Manufacturing jumper </TD><TD> 0: installed, 1: not installed </TD></TR><TR><TD>
|
||||
</TD><TD> </TD><TD> with jumper the BIOS runs an infinite diagnostic loop </TD></TR><TR><TD>
|
||||
bit 4 </TD><TD> RAM on motherboard </TD><TD> 0: 512 KB, 1: 256 KB </TD></TR><TR><TD>
|
||||
bit 3 </TD><TD> </TD><TD> Unused in ISA, EISA, PS/2 systems </TD></TR><TR><TD>
|
||||
</TD><TD> </TD><TD> Can be configured for clock switching </TD></TR><TR><TD>
|
||||
bit 2 </TD><TD> </TD><TD> Unused in ISA, EISA, PS/2 systems </TD></TR><TR><TD>
|
||||
</TD><TD> </TD><TD> Can be configured for clock switching </TD></TR><TR><TD>
|
||||
</TD><TD> Keyboard power </TD><TD> PS/2 MCA: 0: keyboard power normal, 1: no power </TD></TR><TR><TD>
|
||||
bit 1 </TD><TD> Mouse data in </TD><TD> Unused in ISA </TD></TR><TR><TD>
|
||||
bit 0 </TD><TD> Keyboard data in </TD><TD> Unused in ISA </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Clearly only bits 1-0 are input bits.
|
||||
Of the above, the original IBM AT used bits 7-4, while PS/2 MCA systems
|
||||
use only bits 2-0.
|
||||
<P>Where in the above lines P10, P11, etc are used, these refer to the pins
|
||||
corresponding to bit 0, bit 1, etc of port P1.
|
||||
<P>
|
||||
<H2><A NAME="outputport"></A> <A NAME="ss10.5">10.5 The output port P2</A>
|
||||
</H2>
|
||||
|
||||
<P>This has the following layout.
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
bit 7 </TD><TD> Keyboard data </TD><TD> data to keyboard </TD></TR><TR><TD>
|
||||
bit 6 </TD><TD> Keyboard clock </TD></TR><TR><TD>
|
||||
bit 5 </TD><TD> IRQ12 </TD><TD> 0: IRQ12 not active, 1: active </TD></TR><TR><TD>
|
||||
bit 4 </TD><TD> IRQ1 </TD><TD> 0: IRQ1 not active, 1: active </TD></TR><TR><TD>
|
||||
bit 3 </TD><TD> Mouse clock </TD><TD> Unused in ISA </TD></TR><TR><TD>
|
||||
bit 2 </TD><TD> Mouse data </TD><TD> Unused in ISA. Data to mouse </TD></TR><TR><TD>
|
||||
bit 1 </TD><TD> A20 </TD><TD> 0: A20 line is forced 0, 1: A20 enabled </TD></TR><TR><TD>
|
||||
bit 0 </TD><TD> Reset </TD><TD> 0: reset CPU, 1: normal </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Where in the above lines P20, P21, etc are used, these refer to the pins
|
||||
corresponding to bit 0, bit 1, etc of port P2.
|
||||
<P>
|
||||
<H2><A NAME="testinputs"></A> <A NAME="ss10.6">10.6 The test port T</A>
|
||||
</H2>
|
||||
|
||||
<P><I>bit 0</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Keyboard clock (input).
|
||||
</BLOCKQUOTE>
|
||||
<P><I>bit 1</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(AT) Keyboard data (input).
|
||||
(PS/2) Mouse clock (input).
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-11.html">Next</A>
|
||||
<A HREF="scancodes-9.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc10">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
280
specs/kbd/scancodes-11.html
Normal file
@@ -0,0 +1,280 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Keyboard commands</TITLE>
|
||||
<LINK HREF="scancodes-12.html" REL=next>
|
||||
<LINK HREF="scancodes-10.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc11" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-12.html">Next</A>
|
||||
<A HREF="scancodes-10.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc11">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s11">11. Keyboard commands</A></H2>
|
||||
|
||||
<P>One can not only talk to the keyboard controller (by writing to
|
||||
port 0x64), but also to the keyboard (by writing to port 0x60).
|
||||
<P>In order to avoid interference between scancode sequences or
|
||||
mouse packets and the reponses given to commands, the keyboard
|
||||
or mouse should always be disabled before giving a command that
|
||||
requires a response, and probably enabled afterwards.
|
||||
Some keyboards or mice do the disable automatically in this
|
||||
situation, but still require an explicit enable afterwards.
|
||||
<P>Each command (other than 0xfe) is ACKed by 0xfa.
|
||||
Each unknown command is NACKed by 0xfe.
|
||||
Some mice expect a corrected byte as reply to the 0xfe,
|
||||
and will double-NACK with 0xfc when also that is wrong.
|
||||
<P>Here a list with the common commands.
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<A HREF="#kced">0xed</A> </TD><TD> Write LEDs </TD></TR><TR><TD>
|
||||
<A HREF="#kcee">0xee</A> </TD><TD> Diagnostic echo </TD></TR><TR><TD>
|
||||
<A HREF="#kcf0">0xf0</A> </TD><TD> Set/Get scancode set </TD></TR><TR><TD>
|
||||
<A HREF="#kcf2">0xf2</A> </TD><TD> Read keyboard ID </TD></TR><TR><TD>
|
||||
<A HREF="#kcf3">0xf3</A> </TD><TD> Set repeat rate and delay </TD></TR><TR><TD>
|
||||
<A HREF="#kcf4">0xf4</A> </TD><TD> Keyboard enable </TD></TR><TR><TD>
|
||||
<A HREF="#kcf5">0xf5</A> </TD><TD> Set defaults and disable keyboard </TD></TR><TR><TD>
|
||||
<A HREF="#kcf6">0xf6</A> </TD><TD> Set defaults </TD></TR><TR><TD>
|
||||
<A HREF="#kcf7">0xf7</A> </TD><TD> Set all keys to repeat </TD></TR><TR><TD>
|
||||
<A HREF="#kcf8">0xf8</A> </TD><TD> Set all keys to give make/break codes </TD></TR><TR><TD>
|
||||
<A HREF="#kcf9">0xf9</A> </TD><TD> Set all keys to give make codes only </TD></TR><TR><TD>
|
||||
<A HREF="#kcfa">0xfa</A> </TD><TD> Set all keys to repeat and give make/break codes </TD></TR><TR><TD>
|
||||
<A HREF="#kcfb">0xfb</A> </TD><TD> Set a single key to repeat </TD></TR><TR><TD>
|
||||
<A HREF="#kcfc">0xfc</A> </TD><TD> Set a single key to give make/break codes </TD></TR><TR><TD>
|
||||
<A HREF="#kcfd">0xfd</A> </TD><TD> Set a single key to give make codes only </TD></TR><TR><TD>
|
||||
<A HREF="#kcfe">0xfe</A> </TD><TD> Resend </TD></TR><TR><TD>
|
||||
<A HREF="#kcff">0xff</A> </TD><TD> Keyboard reset </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>If the command is preceded by writing 0xd4 to port 0x64, then
|
||||
it goes to the mouse instead of the keyboard. Common commands:
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
<A HREF="scancodes-12.html#mce6">0xe6</A> </TD><TD> Set mouse scaling to 1:1 </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mce7">0xe7</A> </TD><TD> Set mouse scaling to 2:1 </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mce8">0xe8</A> </TD><TD> Set mouse resolution </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mce9">0xe9</A> </TD><TD> Get mouse information </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcf2">0xf2</A> </TD><TD> Read mouse ID </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcf3">0xf3</A> </TD><TD> Set mouse sample rate </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcf4">0xf4</A> </TD><TD> Mouse enable </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcf5">0xf5</A> </TD><TD> Mouse disable </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcf6">0xf6</A> </TD><TD> Set defaults </TD></TR><TR><TD>
|
||||
<A HREF="scancodes-12.html#mcff">0xff</A> </TD><TD> Mouse reset </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>
|
||||
<H2><A NAME="ss11.1">11.1 Keyboard command details</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<P><I>Command <B>e8</B></I>: Nonstandard. Reported to give a
|
||||
2-byte ID on an
|
||||
<A HREF="scancodes-5.html#omnikey">OmniKey</A> keyboard.
|
||||
<P><I>Command <B>ea</B></I>: Nonstandard. The sequences
|
||||
<B>ea</B> <B>70</B> and <B>ea</B> <B>71</B> are
|
||||
used by some IBM keyboards to disable and enable extra keys.
|
||||
<P><I>Command <B>eb</B></I>: Nonstandard. Sequences involving <B>eb</B>
|
||||
are often used for
|
||||
<A HREF="scancodes-1.html#LEDmanip">manipulating extra LEDs</A>.
|
||||
<P><I>Command <B>ec</B></I>: Nonstandard. On the
|
||||
<A HREF="scancodes-5.html#ibmrapidaccess">IBM Rapid Access keyboard</A>
|
||||
this command yields a 2-byte ID.
|
||||
<P><I>Command <B>ed</B>:
|
||||
<A NAME="kced"></A> Write LEDs</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command is followed by a byte indicating the desired LEDs setting.
|
||||
Bits 7-3: unused, 0.
|
||||
Bit 2: 1: CapsLock LED on.
|
||||
Bit 1: 1: NumLock LED on.
|
||||
Bit 0: 1: ScrollLock LED on.
|
||||
When OK, both bytes are ACKed. If the second byte is recognized as a
|
||||
command, that command is ACKed and done instead. Otherwise a NACK is
|
||||
returned (and a keyboard enable may be needed).
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>ee</B>:
|
||||
<A NAME="kcee"></A> Diagnostic echo</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command returns a single byte, again <B>ee</B>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f0</B>:
|
||||
<A NAME="kcf0"></A> Set/Get scancode set</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Many, but not all, keyboards can be switched to three different
|
||||
<A HREF="scancodes-9.html#scancodesets">scancode sets</A>.
|
||||
This command, followed by a byte <B>01</B>, <B>02</B>, or <B>03</B>
|
||||
selects the corresponding scancode set. This command, followed by
|
||||
a zero byte, reads the current scancode set. The reply (translated)
|
||||
is <B>43</B>, <B>41</B> or <B>3f</B>, from untranslated 1, 2 or 3.
|
||||
Note that scancode set 1 should not be translated, while sets
|
||||
2 and 3 should be translated.
|
||||
<P>Set 2 was introduced by the AT. Set 3 by the PS/2.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f2</B>:
|
||||
<A NAME="kcf2"></A> Read keyboard ID</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command reads a 2-byte
|
||||
<A HREF="scancodes-9.html#keyboardid">keyboard ID</A>.
|
||||
XT keyboards do not answer at all (of course),
|
||||
AT keyboards reply with an ACK (<B>fa</B>) only,
|
||||
MF2 and other keyboards reply with a 2-byte ID.
|
||||
Wait at least 10ms after issuing this command.
|
||||
<P>For the mouse reply, see
|
||||
<A HREF="scancodes-12.html#mcf2">below</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f3</B>:
|
||||
<A NAME="kcf3"></A> Set repeat rate and delay</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
A following byte gives the desired delay before a pressed key
|
||||
starts repeating, and the repeat rate.
|
||||
<P>Bit 7: unused, 0.
|
||||
<P>Bits 6-5: 0, 1, 2, 3: 250, 500, 750, 1000 ms delay.
|
||||
Default after reset is 500 ms.
|
||||
<P>Bits 4-0: inter-character delay. The number of characters per second
|
||||
is given by
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
</TD><TD> 0 </TD><TD> 1 </TD><TD> 2 </TD><TD> 3 </TD><TD> 4 </TD><TD> 5 </TD><TD> 6 </TD><TD> 7 </TD></TR><TR><TD>
|
||||
0 </TD><TD> 30.0 </TD><TD> 26.7 </TD><TD> 24.0 </TD><TD> 21.8 </TD><TD> 20.0 </TD><TD> 18.5 </TD><TD> 17.1 </TD><TD> 16.0 </TD></TR><TR><TD>
|
||||
8 </TD><TD> 15.0 </TD><TD> 13.3 </TD><TD> 12.0 </TD><TD> 10.9 </TD><TD> 10.0 </TD><TD> 9.2 </TD><TD> 8.6 </TD><TD> 8.0 </TD></TR><TR><TD>
|
||||
16</TD><TD> 7.5 </TD><TD> 6.7 </TD><TD> 6.0 </TD><TD> 5.5 </TD><TD> 5.0 </TD><TD> 4.6 </TD><TD> 4.3 </TD><TD> 4.0 </TD></TR><TR><TD>
|
||||
24</TD><TD> 3.7 </TD><TD> 3.3 </TD><TD> 3.0 </TD><TD> 2.7 </TD><TD> 2.5 </TD><TD> 2.3 </TD><TD> 2.1 </TD><TD> 2.0 </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>(that is, the inter-character delay is (2 ^ B) * (D + 8) / 240 sec,
|
||||
where B gives Bits 4-3 and D gives Bits 2-0).
|
||||
<P>Default after reset is 10.9 characters per second.
|
||||
<P><B>Logitech extended commands</B>
|
||||
Logitech uses escape sequences involving <B>f3</B> for extended commands.
|
||||
A Logitech extended command looks like
|
||||
<B>f3</B> <B>7f</B> <B>f3</B> <B>00</B> <B>f3</B> <I>xx</I>
|
||||
(for varying 7-bit values of <I>xx</I>). For example:
|
||||
<P><I>xx</I> = <B>01</B>: SendStatus: send the E1 XX codes for SubDeviceType,
|
||||
BatteryStatus, (Channel if relevant) KbdStatus (=wireless status).
|
||||
<P><I>xx</I> = <B>02</B>: OpenLocking
|
||||
<P><I>xx</I> = <B>03</B>: CloseLocking
|
||||
<P><I>xx</I> = <B>06</B> <B>f3</B> <I>aa</I>:
|
||||
Read byte at address <I>aa</I> (in 0x01-0x1e).
|
||||
<P><I>xx</I> = <B>07</B> <B>F3</B> <I>aa</I> <B>f3</B> <I>dd</I>:
|
||||
Write <I>dd</I> at address <I>aa</I> (in 0x01-0x1e).
|
||||
<P><I>xx</I> = <B>10</B> or <B>11</B>: Clear all device-related data
|
||||
in EEPROM and RAM. Now device is disconnected.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f4</B>:
|
||||
<A NAME="kcf4"></A> Keyboard enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
If a transmit error occurs, the keyboard is automatically disabled.
|
||||
This command re-enables the keyboard and clears its internal 16-byte
|
||||
buffer.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f5</B>:
|
||||
<A NAME="kcf5"></A> Set defaults and
|
||||
disable keyboard</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Reset keyboard, clear output buffer, switch off LEDs, reset
|
||||
repeat rate and delay to defaults. Disable the keyboard scan.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f6</B>:
|
||||
<A NAME="kcf6"></A> Set defaults</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Reset keyboard, clear output buffer, switch off LEDs, reset
|
||||
repeat rate and delay to defaults.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f7</B>:
|
||||
<A NAME="kcf7"></A> Set all keys to repeat</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Keyboards that support scancode Set 3 keep for each key two bits:
|
||||
does it repeat? does it generate a break code?
|
||||
This command sets the "repeat" bit for all keys.
|
||||
It does not influence keyboard operation when the scancode set is not Set 3.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f8</B>:
|
||||
<A NAME="kcf8"></A> Set all keys to give make/break
|
||||
codes</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command sets the "generate break code" bit for all keys.
|
||||
It does not influence keyboard operation when the scancode set is not Set 3.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f9</B>:
|
||||
<A NAME="kcf9"></A> Set all keys to give
|
||||
make codes only</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command clears the "generate break code" bit for all keys.
|
||||
It does not influence keyboard operation when the scancode set is not Set 3.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fa</B>:
|
||||
<A NAME="kcfa"></A> Set all keys to repeat
|
||||
and give make/break codes</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command sets the "repeat" and "generate break code" bits for all keys.
|
||||
It does not influence keyboard operation when the scancode set is not Set 3.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fb</B>:
|
||||
<A NAME="kcfb"></A> Set some keys to repeat</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command sets the "repeat" bits for the indicated keys.
|
||||
It is followed by the untranslated Set 3 scancodes of the keys
|
||||
for which this bit must be set. The sequence is ended by a command
|
||||
code (<B>ed</B>, <B>ee</B>, <B>f0</B>, <B>f2</B>-<B>ff</B>).
|
||||
Afterwards, a "keyboard enable" <B>f4</B> is required.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fc</B>:
|
||||
<A NAME="kcfc"></A> Set some keys to give make/break
|
||||
codes</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command sets the "generate break code" bits for the indicated keys.
|
||||
It is followed by the untranslated Set 3 scancodes of the keys
|
||||
for which this bit must be set. The sequence is ended by a command
|
||||
code (<B>ed</B>, <B>ee</B>, <B>f0</B>, <B>f2</B>-<B>ff</B>).
|
||||
Afterwards, a "keyboard enable" <B>f4</B> is required.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fd</B>:
|
||||
<A NAME="kcfd"></A> Set some keys to give make codes
|
||||
only</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command clears the "generate break code" bits for the indicated keys.
|
||||
It is followed by the untranslated Set 3 scancodes of the keys for which
|
||||
this bit must be set. The sequence is ended by a recognized command code
|
||||
(such as <B>ed</B>, <B>ee</B>, <B>f0</B>, <B>f2</B>-<B>ff</B>).
|
||||
Afterwards, a "keyboard enable" <B>f4</B> is required.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fe</B>:
|
||||
<A NAME="kcfe"></A> Resend</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Meant for use by the keyboard controller after a transmission error.
|
||||
Not for use by the CPU.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>ff</B>:
|
||||
<A NAME="kcff"></A> Keyboard reset</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Reset and self-test.
|
||||
The self-test (BAT) will return <B>aa</B> when OK, and <B>fc</B> otherwise.
|
||||
As part of the self-test, all LEDs are flashed.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-12.html">Next</A>
|
||||
<A HREF="scancodes-10.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc11">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
502
specs/kbd/scancodes-12.html
Normal file
@@ -0,0 +1,502 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: The PS/2 Mouse</TITLE>
|
||||
<LINK HREF="scancodes-13.html" REL=next>
|
||||
<LINK HREF="scancodes-11.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc12" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-13.html">Next</A>
|
||||
<A HREF="scancodes-11.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc12">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s12">12. The PS/2 Mouse</A></H2>
|
||||
|
||||
<P>
|
||||
<P>Mice come in various flavours - serial mice, PS/2 mice, busmice, USB mice.
|
||||
Below a little about mice using the PS/2 protocol, since these also use
|
||||
the keyboard controller.
|
||||
<P>A mouse has a number of buttons (1-5 is common) and must report
|
||||
button presses. It has some way of detecting motion, and must report
|
||||
the amount of movement in the X and Y direction, usually as differences
|
||||
with the previously reported position, in a (dx,dy) pair.
|
||||
Touchpads can also report absolute position.
|
||||
<P>Reports come in the form of mouse packets of between 1 and 8 bytes.
|
||||
Various protocols are in use.
|
||||
<P>
|
||||
<H2><A NAME="mousemodes"></A> <A NAME="ss12.1">12.1 Modes</A>
|
||||
</H2>
|
||||
|
||||
<P>A PS/2 mouse can be in <I>stream mode</I> (the default).
|
||||
In this mode it produces a stream of packets indicating mouse movements
|
||||
and button presses. Or it can be in <I>remote mode</I>.
|
||||
In this mode the mouse only sends a packet when the host
|
||||
requests one, using the <B>
|
||||
<A HREF="#mceb">eb</A></B> command.
|
||||
Finally, it can be in <I>echo</I> ("wrap") <I>mode</I>,
|
||||
in which everything the host sends is echoed back, until
|
||||
either a reset (<B>ff</B>) or clear echo mode (<B>ec</B>)
|
||||
is received.
|
||||
<P>
|
||||
<H2><A NAME="ss12.2">12.2 Scaling</A>
|
||||
</H2>
|
||||
|
||||
<P>Scaling can be set to 1:1 or 2:1. This affects stream mode only.
|
||||
In 2:1 scaling: If the unscaled absolute value of dx or dy is 6 or more,
|
||||
it is doubled. Otherwise, for the unscaled value 0,1,2,3,4,5,6, the
|
||||
scaled value 0,1,1,3,6,9,12 is sent.
|
||||
<P>
|
||||
<H2><A NAME="ss12.3">12.3 PS/2 mouse protocol</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<H3>The default protocol</H3>
|
||||
|
||||
<P>The standard PS/2 protocol uses 3-byte packets, as follows:
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
Yovfl </TD><TD> Xovfl </TD><TD> dy8 </TD><TD> dx8 </TD><TD> 1 </TD><TD> Middle Btn </TD><TD> Right Btn </TD><TD> Left Btn </TD></TR><TR><TD>
|
||||
dx7 </TD><TD> dx6 </TD><TD> dx5 </TD><TD> dx4 </TD><TD> dx3 </TD><TD> dx2 </TD><TD> dx1 </TD><TD> dx0 </TD></TR><TR><TD>
|
||||
dy7 </TD><TD> dy6 </TD><TD> dy5 </TD><TD> dy4 </TD><TD> dy3 </TD><TD> dy2 </TD><TD> dy1 </TD><TD> dy0 </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>It gives the movement in the X and Y direction in 9-bit two's complement
|
||||
notation (range -256 to +255) and an overflow indicator.
|
||||
It also gives the status of the three mouse buttons.
|
||||
When this protocol is used, the <B>f2</B> Read mouse ID command
|
||||
is answered by <B>00</B>.
|
||||
<P>
|
||||
<H3>Intellimouse</H3>
|
||||
|
||||
<P>The Microsoft Intellimouse uses the above protocol until scrolling wheel
|
||||
mode is activated by sending the magic sequence
|
||||
<B>f3</B> <B>c8</B> <B>f3</B> <B>64</B> <B>f3</B> <B>50</B>
|
||||
(set sample rate 200, 100, 80). In this mode, the Read mouse ID command
|
||||
returns <B>03</B>, and 4-byte packets are used:
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
Yovfl </TD><TD> Xovfl </TD><TD> dy8 </TD><TD> dx8 </TD><TD> 1 </TD><TD> Middle Btn </TD><TD> Right Btn </TD><TD> Left Btn </TD></TR><TR><TD>
|
||||
dx7 </TD><TD> dx6 </TD><TD> dx5 </TD><TD> dx4 </TD><TD> dx3 </TD><TD> dx2 </TD><TD> dx1 </TD><TD> dx0 </TD></TR><TR><TD>
|
||||
dy7 </TD><TD> dy6 </TD><TD> dy5 </TD><TD> dy4 </TD><TD> dy3 </TD><TD> dy2 </TD><TD> dy1 </TD><TD> dy0 </TD></TR><TR><TD>
|
||||
dz3 </TD><TD> dz3 </TD><TD> dz3 </TD><TD> dz3 </TD><TD> dz3 </TD><TD> dz2 </TD><TD> dz1 </TD><TD> dz0 </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Here the last byte gives the movement of the scrolling wheel in
|
||||
4-bit two's complement notation (range -8 to +7) and the leading
|
||||
four bits are just copies of the sign bit.
|
||||
<P>
|
||||
<H3>Intellimouse Explorer mouse</H3>
|
||||
|
||||
<P>The Explorer mouse protocol allows for scrolling wheel and five buttons.
|
||||
It is activated by first sending the magic sequence for Intellimouse,
|
||||
and then, when the Intellimouse ID has been seen, sending the magic sequence
|
||||
<B>f3</B> <B>c8</B> <B>f3</B> <B>c8</B> <B>f3</B> <B>50</B>
|
||||
(set sample rate 200, 200, 80). In this mode, the Read mouse ID command
|
||||
returns <B>04</B>, and 4-byte packets are used:
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
Yovfl </TD><TD> Xovfl </TD><TD> dy8 </TD><TD> dx8 </TD><TD> 1 </TD><TD> Middle Btn </TD><TD> Right Btn </TD><TD> Left Btn </TD></TR><TR><TD>
|
||||
dx7 </TD><TD> dx6 </TD><TD> dx5 </TD><TD> dx4 </TD><TD> dx3 </TD><TD> dx2 </TD><TD> dx1 </TD><TD> dx0 </TD></TR><TR><TD>
|
||||
dy7 </TD><TD> dy6 </TD><TD> dy5 </TD><TD> dy4 </TD><TD> dy3 </TD><TD> dy2 </TD><TD> dy1 </TD><TD> dy0 </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> 5th Btn </TD><TD> 4th Btn </TD><TD> dz3 </TD><TD> dz2 </TD><TD> dz1 </TD><TD> dz0 </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Lots of other protocols occur, and only incomplete data is known
|
||||
about most of them. Some examples.
|
||||
<P>
|
||||
<H3>Typhoon mouse</H3>
|
||||
|
||||
<P>The Typhoon optical mouse is reported to send 6-byte packets.
|
||||
Bytes 1-3 are as for the default PS/2 protocol.
|
||||
Byte 4 equals byte 1. Byte 5 gives the Z axis movement, one of
|
||||
<B>ff</B>, <B>00</B>, <B>01</B>. Byte 6 is 0.
|
||||
Of course the idea is that this packet looks like two ordinary packets
|
||||
and ordinary PS/2 mouse drivers will handle it.
|
||||
The 6-byte mode is activated by sending the magic sequence
|
||||
<B>f3</B> <B>c8</B> <B>f3</B> <B>64</B> <B>f3</B> <B>50</B>
|
||||
<B>f3</B> <B>3c</B> <B>f3</B> <B>28</B> <B>f3</B> <B>14</B>
|
||||
(set sample rate 200, 100, 80, 60, 40, 20).
|
||||
It is recognized by the ID <B>08</B>.
|
||||
<P>
|
||||
<H2><A NAME="ss12.4">12.4 Mouse Commands</A>
|
||||
</H2>
|
||||
|
||||
<P>Every command or data byte sent to the mouse (except for the
|
||||
resend command <B>fe</B>) is ACKed with <B>fa</B>.
|
||||
If the command or data is invalid, it is NACKed with <B>fe</B>.
|
||||
If the next byte is again invalid, the reply is ERROR: <B>fc</B>.
|
||||
<P>
|
||||
<P><I>Command <B>d0</B>: Read extended ID</I>
|
||||
<P>Read up to 256 bytes.
|
||||
<P><I>Commands <B>d1</B>-<B>df</B>: Vendor unique commands</I>
|
||||
<P>
|
||||
<P><I>Command <B>d1</B>: Logitech PS/2++ command</I>
|
||||
<P>This command was to be used, followed by an arbitrary data sequence.
|
||||
Now replaced by the
|
||||
<A HREF="#sliced">sliced commands</A> using
|
||||
<B>e8</B>.
|
||||
<P><I>Command <B>e1</B>: Read secondary ID</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Replies with two bytes.
|
||||
An IBM TrackPoint returns <B>01</B> as first byte,
|
||||
and a second byte depending on the model.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>e2</B>: IBM TrackPoint command</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Followed by several parameter bytes. For details, see
|
||||
<A HREF="http://trackpoint.almaden.ibm.com/files/ykt3dext.pdf">ykt3dext.pdf</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>e6</B>:
|
||||
<A NAME="mce6"></A> Set mouse scaling to 1:1</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Often ingredient in magic sequences.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>e7</B>:
|
||||
<A NAME="mce7"></A> Set mouse scaling to 2:1</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Often ingredient in magic sequences.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>e8</B>:
|
||||
<A NAME="mce8"></A> Set mouse resolution</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command is followed by a byte indicating the resolution
|
||||
(0, 1, 2, 3: 1, 2, 4, 8 units per mm, respectively).
|
||||
It is used in magic sequences to transport two bits,
|
||||
so that four of these are needed to send a byte to the mouse.
|
||||
See
|
||||
<A HREF="#sliced">below</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>e9</B>:
|
||||
<A NAME="mce9"></A> Status request</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This command returns three bytes:
|
||||
<P>First a status byte:
|
||||
Bit 7: unused, 0.
|
||||
Bit 6: 0:
|
||||
<A HREF="#mousemodes">stream mode</A>,
|
||||
1:
|
||||
<A HREF="#mousemodes">remote mode</A>.
|
||||
Bit 5: 0: disabled, 1: enabled.
|
||||
Bit 4: 0: scaling set to 1:1, 1: scaling set to 2:1.
|
||||
Bit 3: unused, 0.
|
||||
Bit 2: 1: left button pressed.
|
||||
Bit 1: 1: middle button pressed.
|
||||
Bit 0: 1: right button pressed.
|
||||
<P>Then a resolution byte:
|
||||
0, 1, 2, 3: 1, 2, 4, 8 units per mm, respectively.
|
||||
<P>Finally a sample rate (in Hz).
|
||||
<P>See below for special
|
||||
<A HREF="#synaptics">Synaptics Touchpad</A> handling.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>ea</B>: Set
|
||||
<A HREF="#mousemodes">stream mode</A></I>
|
||||
<P>
|
||||
<P><I>Command <B>eb</B>:
|
||||
<A NAME="mceb"></A> Read data</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
Read a mouse packet.
|
||||
Needed in
|
||||
<A HREF="#mousemodes">remote mode</A> to ask the mouse for data.
|
||||
Also functions in
|
||||
<A HREF="#mousemodes">stream mode</A>.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>ec</B>: Clear
|
||||
<A HREF="#mousemodes">echo mode</A></I>
|
||||
<P>
|
||||
<P><I>Command <B>ee</B>: Set
|
||||
<A HREF="#mousemodes">echo mode</A></I>
|
||||
<P>
|
||||
<P><I>Command <B>f0</B>: Set
|
||||
<A HREF="#mousemodes">remote mode</A></I>
|
||||
<P>
|
||||
<P><I>Command <B>f2</B>:
|
||||
<A NAME="mcf2"></A> Read mouse ID</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(Only supported on some systems.)
|
||||
This command reads a 1-byte mouse ID. The reply is a single byte <B>00</B>.
|
||||
Wait at least 10ms after issuing this command.
|
||||
<P>For the keyboard reply, see
|
||||
<A HREF="scancodes-11.html#kcf2">above</A>.
|
||||
<P>BallPoint (trackball) devices return a single byte <B>02</B>,
|
||||
Intellimouse returns <B>03</B>,
|
||||
Explorer Mouse returns <B>04</B>,
|
||||
4d Mouse returns <B>06</B>,
|
||||
4dplus Mouse returns <B>08</B>,as does the Typhoon mouse.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f3</B>:
|
||||
<A NAME="mcf3"></A> Set mouse sample rate</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
(Only supported on some systems.)
|
||||
Set mouse sample rate in Hz.
|
||||
If the given sampling rate is acceptable the ACK is <B>fa</B>.
|
||||
Otherwise the NACK is <B>fe</B>, and the host can correct.
|
||||
If it is incorrect again <B>fc</B> is sent.
|
||||
Correct values are, e.g., 10, 20, 40, 60, 80, 100, 200.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f4</B>:
|
||||
<A NAME="mcf4"></A> Mouse enable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
The stream mode mouse data reporting is disabled after a reset and after
|
||||
the
|
||||
<A HREF="#mcf5">disable</A> command. This command enables it again.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f5</B>:
|
||||
<A NAME="mcf5"></A> Mouse disable</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
This stops mouse data reporting in
|
||||
<A HREF="#mousemodes">stream mode</A>.
|
||||
In stream mode, this command should be sent before sending any other commands.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>f6</B>:
|
||||
<A NAME="mcf6"></A> Set defaults</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
If this command is recognized, a reset is done (set sampling rate 100 Hz,
|
||||
resolution 4 counts/mm,
|
||||
<A HREF="#mousemodes">stream mode</A>,
|
||||
disabled, scaling 1:1), but no diagnostics are performed.
|
||||
For some enhanced mice that require a magic sequence to get into
|
||||
enhanced mode, this command will reset them to default PS/2 mode.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>fe</B>: Resend</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
If this command is recognized, the last mouse packet (possibly several bytes)
|
||||
is resent. There is no ACK to this command, but if the last reply was ACK,
|
||||
it is sent.
|
||||
</BLOCKQUOTE>
|
||||
<P><I>Command <B>ff</B>:
|
||||
<A NAME="mcff"></A> Mouse reset</I>
|
||||
<P>
|
||||
<BLOCKQUOTE>
|
||||
A self-test is performed. When OK, the response is <B>aa</B> <B>00</B>.
|
||||
On error, the response is <B>fc</B> <B>00</B>.
|
||||
The mouse is reset to default PS/2 mode.
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="sliced"></A> <A NAME="ss12.5">12.5 Sliced parameters</A>
|
||||
</H2>
|
||||
|
||||
<P>For more advanced mouse modes it is necessary to send data to the mouse.
|
||||
There is now a commonly accepted way.
|
||||
<P>First Logitech tried to use the <B>d1</B> command followed by an
|
||||
arbitrary data sequence.
|
||||
While the IBM specs reserve <B>d1</B>-<B>df</B> for vendor unique commands,
|
||||
it turns out that not all BIOSes will transmit such codes.
|
||||
So Logitech drops the <B>d1</B> and uses the sequence
|
||||
<B>e8</B> <I>aa</I> <B>e8</B> <I>bb</I> <B>e8</B> <I>cc</I>
|
||||
<B>e8</B> <I>dd</I> to transmit the byte <I>aabbccdd</I>, where
|
||||
<I>aa</I>, <I>bb</I>, <I>cc</I>, <I>dd</I> are 2-bit quantities.
|
||||
In this way an arbitrarily long sequence of bytes can be transmitted.
|
||||
<P>For synchronization purposes it is possible to separate such groups
|
||||
of four <B>e8</B> commands by an <B>e6</B> command.
|
||||
Indeed, such separation may be required: Synaptics Touchpads react to
|
||||
<B>e9</B> or <B>f3</B> commands preceded by precisely four
|
||||
<B>e8</B> commands.
|
||||
<P>
|
||||
<H3>Magic knock</H3>
|
||||
|
||||
<P>For example, the "magic knock" <B>d1</B> <B>39</B> <B>db</B>
|
||||
that sets a device that understands it in PS/2++ mode,
|
||||
becomes <B>e8</B> <B>00</B> <B>e8</B> <B>03</B>
|
||||
<B>e8</B> <B>02</B> <B>e8</B> <B>01</B> <B>e6</B>
|
||||
<B>e8</B> <B>03</B> <B>e8</B> <B>01</B>
|
||||
<B>e8</B> <B>02</B> <B>e8</B> <B>03</B>,
|
||||
abbreviated {E8}0321 {E6} {E8}3123.
|
||||
Note that 0321 and 3123 do not have repeated symbols. If they had,
|
||||
too intelligent intermediate hardware transmitting these sequences
|
||||
might see a superfluous command and suppress it.
|
||||
<P>
|
||||
<H3>Magic unknock</H3>
|
||||
|
||||
<P>PS/2++ mode is cleared again by the "magic unknock"
|
||||
{E8} 0323 or D1 3B from an external device, and
|
||||
{E8} 0321 or D1 39 from an internal device.
|
||||
(These commands differ so that in setups where the same commands are
|
||||
sent to internal and external devices, they can be commanded separately.)
|
||||
<P>For a decription of the PS/2++ format, see
|
||||
<A HREF="http://www.dqcs.com/logitech/ps2ppspec.htm">ps2ppspec.htm</A>.
|
||||
<P>
|
||||
<H2><A NAME="synaptics"></A> <A NAME="ss12.6">12.6 Synaptics Touchpad</A>
|
||||
</H2>
|
||||
|
||||
<P>A few sketchy details. For nice precise information, get
|
||||
the
|
||||
<A HREF="http://www.synaptics.com/decaf/utilities/ACF126.pdf">Synaptics interfacing guide</A>.
|
||||
<P>
|
||||
<H3>Status request</H3>
|
||||
|
||||
<P>When preceded by an 8-bit request number encoded via four
|
||||
<B>
|
||||
<A HREF="#mce8">e8</A></B>
|
||||
commands, the <B>
|
||||
<A HREF="#mce9">e9</A></B> status request
|
||||
returns modified output, somewhat dependent on the Touchpad model.
|
||||
<P>
|
||||
<P><I>Request <B>00</B>: Identify Touchpad</I>
|
||||
<P>This request returns three bytes, of which the middle one
|
||||
is the constant <B>47</B>. This is the way to recognize
|
||||
a Touchpad. The low order four bits of the third word contain
|
||||
the major model version number, the first word contains the
|
||||
minor version number, and the high order four bits of the
|
||||
third word contain the (obsolete) model code.
|
||||
<P>
|
||||
<P><I>Request <B>01</B>: Read Touchpad Modes</I>
|
||||
<P>This request returns three bytes, of which the first two
|
||||
are the constants <B>3b</B> and <B>47</B>.
|
||||
The last byte is the mode byte
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
ABS </TD><TD> Rate </TD><TD> - </TD><TD> - </TD><TD> Baud/Sleep </TD><TD> DisGest </TD><TD> PackSize </TD><TD> Wmode </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>Here ABS indicates <I>absolute mode</I> (instead of the default
|
||||
relative mode).
|
||||
<P>Rate is 0 for 40 packets/sec, 1 for 80 packets/sec.
|
||||
The PS/2 sampling rate value is ignored.
|
||||
<P>Baud/Sleep indicates the baud rate when used with a serial protocol
|
||||
(0: 1200 baud, 1: 9600 baud). It must be set whenever ABS or Rate is set.
|
||||
When used with the PS/2 protocol this bit indicates <I>sleep mode</I> -
|
||||
a low power mode in which finger activity is ignored and only button
|
||||
presses are reported.
|
||||
<P>DisGest is the "disable gestures" bit. When set, we have classical
|
||||
mouse behaviour. When cleared, "tap" and "drag" processing is enabled.
|
||||
<P>PackSize is used for the serial protocol only (and then chooses between
|
||||
6-, 7- and 8-byte packets, also depending on the Wmode bit).
|
||||
<P>Wmode is used in absolute mode only. When set the packets also
|
||||
contain the W value. (This value indicates the amount of contact:
|
||||
0: two-finger contact, 1: three-finger contact, 2: pen contact,
|
||||
3: reserved, 4-7: ordinary finger contact, 8-15: wide finger or palm contact.)
|
||||
<P>This described Touchpad 4.x. Earlier models had up to four mode bytes.
|
||||
This request would return mode bytes 1 and 2 in the first and last result byte,
|
||||
and request <B>02</B> would return mode bytes 3 and 4.
|
||||
<P>
|
||||
<P><I>Request <B>02</B>: Read Capabilities</I>
|
||||
<P>This request returns three bytes, of which the middle one is
|
||||
the constant <B>47</B>. The first and third byte are the high-order
|
||||
and low-order parts of the capability word.
|
||||
(Thus on Touchpad 4.x. On earlier models mode bytes 3 and 4 are returned.)
|
||||
<P>This capability word has 16 bits. Bit 15 indicates that capabilities
|
||||
are supported. Bit 4 indicates that Sleep is supported (for the PS/2
|
||||
protocol). Bit 3 indicates that four buttons (Left, Right, Up, Down)
|
||||
are supported. Bit 1 indicates that multi-finger detection is supported.
|
||||
Bit 0 indicates that palm detection is supported.
|
||||
<P>
|
||||
<P><I>Request <B>03</B>: Read Model ID</I>
|
||||
<P>
|
||||
<P><I>Request <B>06</B>: Read Serial Number Prefix</I>
|
||||
<P>
|
||||
<P><I>Request <B>07</B>: Read Serial Number Suffix</I>
|
||||
<P>
|
||||
<P><I>Request <B>08</B>: Read Resolution</I>
|
||||
<P>
|
||||
<P>
|
||||
<H3>Mode setting</H3>
|
||||
|
||||
<P>When preceded by an 8-bit request number encoded via four <B>e8</B>
|
||||
commands, the <B>
|
||||
<A HREF="#mcf3">f3</A></B> <B>14</B>
|
||||
(set sample rate 20) command sets the mode byte to the
|
||||
encoded number. (Thus on Touchpads 4.x. Older models have more mode
|
||||
bytes and several such commands.)
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss12.7">12.7 Vendor extensions</A>
|
||||
</H2>
|
||||
|
||||
<P>There is a complicated forest of "magic sequences" that enable
|
||||
vendor extensions. Recognizing all of these is a very obscure activity.
|
||||
<P>(Moreover, recognizing these may be counterproductive:
|
||||
if the mouse has special capabilities which are activated
|
||||
by a special sequence, and it is connected to the computer
|
||||
via a KVM switch that does not know about this special protocol,
|
||||
then switching away and back will leave the mouse in the non-special
|
||||
state. This leads to non-functioning mice.)
|
||||
<P>A 2002 Logitech file describes the following procedure for recognizing
|
||||
the mouse type:
|
||||
<P>Stage 1: Send <B>ff</B>: reset.
|
||||
The reply is ignored. (Most common is <B>aa</B> <B>00</B>.)
|
||||
<P>Stage 2: Send <B>f3</B> <B>0a</B> <B>f2</B>: set sample rate
|
||||
and ask for ID. If the reply is <B>02</B>, we have a trackball -
|
||||
it has its own protocol. (The usual reply is <B>00</B>.)
|
||||
<P>Stage 3: Send <B>e8</B> <B>00</B> <B>e6</B> <B>e6</B> <B>e6</B>
|
||||
<B>e9</B>: set resolution and scaling (three times), and request status.
|
||||
The reply consists of three bytes <I>s1</I> <I>s2</I> <I>s3</I>.
|
||||
An old-fashioned mouse would report 0 in the second status byte <I>s2</I>
|
||||
(since that is the resolution and we just set it).
|
||||
<P>If <I>s2</I> is nonzero then: <I>s2</I> is the number of buttons,
|
||||
<I>s3</I> is the firmware revision,
|
||||
<I>s1</I> has the firmware ID (device type) bits 6-0 in bits 3-0,6-4,
|
||||
while bit 7 of s1 indicates support for the
|
||||
<B>e7</B> <B>e7</B> <B>e7</B> <B>e9</B> command.
|
||||
<P>If <I>s1</I>=<B>d0</B> and <I>s2</I>=<B>03</B> and
|
||||
<I>s3</I>=<B>c8</B>, suspect Synaptics.
|
||||
<P>If <I>s1</I> and <I>s2</I> are zero but <I>s3</I> equals <B>0a</B>,
|
||||
suspect Alps. (<I>s3</I>=<B>0a</B> is as expected, but <I>s1</I>=0
|
||||
is not)
|
||||
<P>Stage 4: If bit 7 of <I>s1</I> is set, or if we suspect Alps,
|
||||
send <B>e8</B> <B>00</B> <B>e7</B> <B>e7</B> <B>e7</B> <B>e9</B>:
|
||||
set resolution and scaling (three times), and request status.
|
||||
The reply consists of three bytes <I>t1</I> <I>t2</I> <I>t3</I>.
|
||||
Of course, we already know that this is not an old-fashioned mouse.
|
||||
<P>If <I>t2</I>=<B>01</B> and FirmwareID < 0x10 and
|
||||
<I>t1</I> >> 6 = 1, then conclude that we have a
|
||||
Cordless MouseMan (RA12).
|
||||
<P>If <I>t2</I>=<B>01</B> and FirmwareID < 0x10 and
|
||||
<I>t1</I> >> 6 = 3, then conclude that we have a
|
||||
Cordless MouseMan (RB24).
|
||||
<P>Other cases with <I>t2</I>=<B>01</B> are for new cordless mice.
|
||||
<P>If we suspect Synaptics and <I>t2</I>=0 and <I>t3</I>=<B>0a</B>,
|
||||
then conclude that we have a Synaptics touchpad.
|
||||
<P>If we suspect Alps and <I>t1</I>=<B>33</B>, then conclude that
|
||||
we have an Alps touchpad.
|
||||
<P>Stage 5: If we don't know the type yet, send <B>f3</B> <B>c8</B>
|
||||
<B>f3</B> <B>64</B> <B>f3</B> <B>50</B> <B>f2</B>:
|
||||
Set sampling rate to 200, 100, 80 Hz, and ask for ID.
|
||||
The reply is a single byte.
|
||||
If we get 3, conclude that we have an IntelliMouse.
|
||||
(And this sequence is the initialization sequence for the IntelliMouse.)
|
||||
<P>Stage 6: Send <B>ff</B>: reset. Now the device is no longer in any
|
||||
special state.
|
||||
<P>Stage 7: If we don't know the type yet, send <B>e8</B> <B>00</B>
|
||||
<B>e8</B> <B>00</B> <B>e8</B> <B>00</B> <B>e8</B> <B>00</B>
|
||||
<B>e9</B>: set resolution to 0 (four times), and ask for status.
|
||||
The reply consists of three bytes <I>u1</I> <I>u2</I> <I>u3</I>.
|
||||
If <I>u2</I>=<B>47</B> and <I>u3</I>=<B>13</B>, then conclude
|
||||
that we have a new Synaptics touchpad.
|
||||
<P>Stage 7a: At this point we can narrow down to model type.
|
||||
If the thing is Synaptics or Alps, then Logitech is no longer interested.
|
||||
If it has 3 buttons, FirmwareID 1 and firmware revision <B>50</B>,
|
||||
then conclude that it is a Logitech Mouseman.
|
||||
<P>Stage 8: If we think it is a touchpad, detect whether it has programmable RAM.
|
||||
Send <B>e6</B> <B>e8</B> <B>00</B> <B>e8</B> <B>00</B> <B>e8</B>
|
||||
<B>00</B> <B>e8</B> <B>00</B> <B>e9</B>. The reply consists of three
|
||||
bytes <I>v1</I> <I>v2</I> <I>v3</I>.
|
||||
If <I>v1</I>=<B>06</B> and <I>v2</I>=<B>00</B>, then conclude
|
||||
that we have a Touchpad TP3 with programmable RAM.
|
||||
<P>Stage 9: Test whether the device understands the Logitech PS/2++ protocol.
|
||||
Send the "magic knock" <B>f5</B> <B>e8</B> <B>00</B> <B>e8</B>
|
||||
<B>03</B> <B>e8</B> <B>02</B> <B>e8</B> <B>01</B> <B>e6</B>
|
||||
<B>e8</B> <B>03</B> <B>e8</B> <B>01</B> <B>e8</B> <B>02</B>
|
||||
<B>e8</B> <B>03</B> <B>f4</B>.
|
||||
Check whether the device replies with an extended report.
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-13.html">Next</A>
|
||||
<A HREF="scancodes-11.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc12">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
79
specs/kbd/scancodes-13.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: USB</TITLE>
|
||||
<LINK HREF="scancodes-14.html" REL=next>
|
||||
<LINK HREF="scancodes-12.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc13" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-14.html">Next</A>
|
||||
<A HREF="scancodes-12.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc13">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s13">13. USB</A></H2>
|
||||
|
||||
<P>The USB specification prescribes 16-bit keycodes for keyboard positions,
|
||||
identified with key captions for the usual US layout.
|
||||
Below the values are given in decimal. 0-3 are protocol values,
|
||||
namely NoEvent, ErrorRollOver, POSTFail, ErrorUndefined, respectively.
|
||||
The values 224-231 are for modifier keys.
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
</TD><TD> 1 </TD><TD> 2 </TD><TD> 3 </TD><TD> 4 </TD><TD> 5 </TD><TD> 6 </TD><TD> 7 </TD><TD> 8 </TD><TD> 9 </TD><TD> 10 </TD><TD> 11 </TD></TR><TR><TD>
|
||||
- </TD><TD> err </TD><TD> err </TD><TD> err </TD><TD> A </TD><TD> B </TD><TD> C </TD><TD> D </TD><TD> E </TD><TD> F </TD><TD> G </TD><TD> H </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
12 </TD><TD> 13 </TD><TD> 14 </TD><TD> 15 </TD><TD> 16 </TD><TD> 17 </TD><TD> 18 </TD><TD> 19 </TD><TD> 20 </TD><TD> 21 </TD><TD> 22 </TD><TD> 23 </TD></TR><TR><TD>
|
||||
I </TD><TD> J </TD><TD> K </TD><TD> L </TD><TD> M </TD><TD> N </TD><TD> O </TD><TD> P </TD><TD> Q </TD><TD> R </TD><TD> S </TD><TD> T </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
24 </TD><TD> 25 </TD><TD> 26 </TD><TD> 27 </TD><TD> 28 </TD><TD> 29 </TD><TD> 30 </TD><TD> 31 </TD><TD> 32 </TD><TD> 33 </TD><TD> 34 </TD><TD> 35 </TD></TR><TR><TD>
|
||||
U </TD><TD> V </TD><TD> W </TD><TD> X </TD><TD> Y </TD><TD> Z </TD><TD> 1 </TD><TD> 2 </TD><TD> 3 </TD><TD> 4 </TD><TD> 5 </TD><TD> 6 </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
36 </TD><TD> 37 </TD><TD> 38 </TD><TD> 39 </TD><TD> 40 </TD><TD> 41 </TD><TD> 42 </TD><TD> 43 </TD><TD> 44 </TD><TD> 45 </TD><TD> 46 </TD><TD> 47 </TD></TR><TR><TD>
|
||||
7 </TD><TD> 8 </TD><TD> 9 </TD><TD> 0 </TD><TD> Enter </TD><TD> Esc </TD><TD> BSp </TD><TD> Tab </TD><TD> Space </TD><TD> - / _ </TD><TD> = / + </TD><TD> [ / { </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
48 </TD><TD> 49 </TD><TD> 50 </TD><TD> 51 </TD><TD> 52 </TD><TD> 53 </TD><TD>54 </TD><TD> 55 </TD><TD> 56 </TD><TD> 57 </TD><TD> 58 </TD><TD> 59 </TD></TR><TR><TD>
|
||||
] / } </TD><TD> \ / | </TD><TD> ... </TD><TD> ; / : </TD><TD> ' / " </TD><TD> ` / ~ </TD><TD>, / < </TD><TD> . / > </TD><TD> / / ? </TD><TD> Caps Lock </TD><TD> F1 </TD><TD> F2 </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
60 </TD><TD> 61 </TD><TD> 62 </TD><TD> 63 </TD><TD> 64 </TD><TD> 65 </TD><TD> 66 </TD><TD> 67 </TD><TD> 68 </TD><TD> 69 </TD><TD> 70 </TD><TD> 71 </TD></TR><TR><TD>
|
||||
F3 </TD><TD> F4 </TD><TD> F5 </TD><TD> F6 </TD><TD> F7 </TD><TD> F8 </TD><TD> F9 </TD><TD> F10 </TD><TD> F11 </TD><TD> F12 </TD><TD> PrtScr </TD><TD> Scroll Lock </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
72 </TD><TD> 73 </TD><TD> 74 </TD><TD> 75 </TD><TD> 76 </TD><TD> 77 </TD><TD>78 </TD><TD> 79 </TD><TD> 80 </TD><TD> 81 </TD><TD> 82 </TD><TD> 83 </TD></TR><TR><TD>
|
||||
Pause </TD><TD> Insert </TD><TD> Home </TD><TD> PgUp </TD><TD> Delete </TD><TD> End </TD><TD>PgDn </TD><TD> Right </TD><TD> Left </TD><TD> Down </TD><TD> Up </TD><TD> Num Lock </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
84 </TD><TD> 85 </TD><TD> 86 </TD><TD> 87 </TD><TD> 88 </TD><TD> 89 </TD><TD>90 </TD><TD> 91 </TD><TD> 92 </TD><TD> 93 </TD><TD> 94 </TD><TD> 95 </TD></TR><TR><TD>
|
||||
KP / </TD><TD> KP * </TD><TD> KP - </TD><TD> KP + </TD><TD> KP Enter </TD><TD> KP 1 / End </TD><TD>KP 2 / Down </TD><TD> KP 3 / PgDn </TD><TD> KP 4 / Left </TD><TD> KP 5 </TD><TD> KP 6 / Right </TD><TD> KP 7 / Home </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
96 </TD><TD> 97 </TD><TD> 98 </TD><TD> 99 </TD><TD> 100 </TD><TD> 101 </TD><TD>102 </TD><TD> 103 </TD><TD> 104 </TD><TD> 105 </TD><TD> 106 </TD><TD> 107 </TD></TR><TR><TD>
|
||||
KP 8 / Up </TD><TD> KP 9 / PgUp </TD><TD> KP 0 / Ins </TD><TD> KP . / Del </TD><TD> ... </TD><TD> Applic </TD><TD>Power </TD><TD> KP = </TD><TD> F13 </TD><TD> F14 </TD><TD> F15 </TD><TD> F16 </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
108 </TD><TD> 109 </TD><TD> 110 </TD><TD> 111 </TD><TD> 112 </TD><TD> 113 </TD><TD> 114 </TD><TD> 115 </TD><TD> 116 </TD><TD> 117 </TD><TD> 118 </TD><TD> 119 </TD></TR><TR><TD>
|
||||
F17 </TD><TD> F18 </TD><TD> F19 </TD><TD> F20 </TD><TD> F21 </TD><TD> F22 </TD><TD> F23 </TD><TD> F24 </TD><TD> Execute </TD><TD> Help </TD><TD> Menu </TD><TD> Select </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
120 </TD><TD> 121 </TD><TD> 122 </TD><TD> 123 </TD><TD> 124 </TD><TD> 125 </TD><TD>126 </TD><TD> 127 </TD><TD> 128 </TD><TD> 129 </TD><TD> 130 </TD><TD> 131 </TD></TR><TR><TD>
|
||||
Stop </TD><TD> Again </TD><TD> Undo </TD><TD> Cut </TD><TD> Copy </TD><TD> Paste </TD><TD>Find </TD><TD> Mute </TD><TD> Volume Up </TD><TD> Volume Down </TD><TD> Locking Caps Lock </TD><TD> Locking Num Lock </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
132 </TD><TD> 133 </TD><TD> 134 </TD><TD> 135 </TD><TD> 136 </TD><TD> 137 </TD><TD>138 </TD><TD> 139 </TD><TD> 140 </TD><TD> 141 </TD><TD> 142 </TD><TD> 143 </TD></TR><TR><TD>
|
||||
Locking Scroll Lock </TD><TD> KP , </TD><TD> KP = </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD>Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
144 </TD><TD> 145 </TD><TD> 146 </TD><TD> 147 </TD><TD> 148 </TD><TD> 149 </TD><TD> 150 </TD><TD> 151 </TD><TD> 152 </TD><TD> 153 </TD><TD> 154 </TD><TD> 155 </TD></TR><TR><TD>
|
||||
LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> Alt Erase </TD><TD> SysRq </TD><TD> Cancel </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
156 </TD><TD> 157 </TD><TD> 158 </TD><TD> 159 </TD><TD> 160 </TD><TD> 161 </TD><TD> 162 </TD><TD> 163 </TD><TD> 164 </TD><TD>165</TD><TD>166</TD><TD>167 </TD></TR><TR><TD>
|
||||
Clear </TD><TD> Prior </TD><TD> Return </TD><TD> Separ </TD><TD> Out </TD><TD> Oper </TD><TD> Clear / Again </TD><TD> CrSel / Props </TD><TD> ExSel </TD><TD> </TD><TD> </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
224 </TD><TD> 225 </TD><TD> 226 </TD><TD> 227 </TD><TD> 228 </TD><TD> 229 </TD><TD> 230 </TD><TD> 231 </TD></TR><TR><TD>
|
||||
LCtrl </TD><TD> LShift </TD><TD> LAlt </TD><TD> LGUI </TD><TD> RCtrl </TD><TD> RShift </TD><TD> RAlt </TD><TD> RGUI </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-14.html">Next</A>
|
||||
<A HREF="scancodes-12.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc13">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
26
specs/kbd/scancodes-14.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Reporting</TITLE>
|
||||
<LINK HREF="scancodes-13.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc14" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
Next
|
||||
<A HREF="scancodes-13.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc14">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s14">14. Reporting</A></H2>
|
||||
|
||||
<P>Additions and corrections are welcome.
|
||||
Use <CODE>showkey -s</CODE> to get the scancodes.
|
||||
Mention keyboard manufacturer and type, and the keycaps.
|
||||
<P>Andries Brouwer - <CODE>aeb@cwi.nl</CODE>
|
||||
<P>
|
||||
<HR>
|
||||
Next
|
||||
<A HREF="scancodes-13.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc14">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
182
specs/kbd/scancodes-2.html
Normal file
@@ -0,0 +1,182 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Special keyboards - XT keyboards</TITLE>
|
||||
<LINK HREF="scancodes-3.html" REL=next>
|
||||
<LINK HREF="scancodes-1.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc2" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-3.html">Next</A>
|
||||
<A HREF="scancodes-1.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc2">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s2">2. Special keyboards - XT keyboards</A></H2>
|
||||
|
||||
<P><I>First keyboards with an XT interface.
|
||||
There is no keyboard controller, no commands to the keyboard.
|
||||
On a modern computer these will usually yield "keyboard error"
|
||||
or "KB/interface error" or some such, but sometimes they can be
|
||||
used nevertheless.</I>
|
||||
<P>The IBM PC (all models) and the IBM XT (models 68, 78, 86, 87, 88,
|
||||
267, 277) came with this 83-key keyboard.
|
||||
The IBM AT (models 68, 99, 239, 319) came with an 84-key keyboard.
|
||||
The IBM XT (models 89, 268, 278, 286) and the IBM AT model 339
|
||||
came with a 101-key keyboard.
|
||||
<P>The original IBM 83-key PC/XT keyboard did not have LEDs.
|
||||
The original IBM 84-key AT keyboard has LEDs, separates the
|
||||
keypad from the main area, moves the Esc key to the right,
|
||||
and adds the SysReq key.
|
||||
The original IBM 101-key keyboard moves the ten function keys
|
||||
from the left to the top row and adds two more. The Esc key is moved
|
||||
in front of this row of function keys. The "number" and "cursor"
|
||||
functions of the keypad are separated. There are duplicate Ctrl and Alt
|
||||
keys.
|
||||
<P>
|
||||
<H2><A NAME="ss2.1">2.1 XT keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>The
|
||||
<A HREF="xtkbd.jpg">XT keyboard</A>
|
||||
has 83 keys, nicely numbered 1-83, that is, with scancodes
|
||||
<B>01</B>-<B>53</B>. No escaped scancodes.
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="xtkbd-s.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Victor keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>This
|
||||
<A HREF="victor.jpg">Victor keyboard</A>
|
||||
is very similar. The keypad is separated here, and the Esc key
|
||||
has been moved to the keypad. The frontside of the ScrollLock key
|
||||
says Break. It resembles an AT keyboard but has only 83 keys,
|
||||
the SysRq is still missing.
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="victor-s.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 Olivetti M24 keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="m24.jpg">
|
||||
</FIGURE>
|
||||
|
||||
The Olivetti M24 (also sold under the names Logabax 1600 and
|
||||
ATT PC-6300) was an IBM compatible manufactured in 1984.
|
||||
<P>John Elliott writes:
|
||||
The Olivetti M24 is an XT sort-of clone. It
|
||||
has two possible keyboards - the normal (83-key) IBM one,
|
||||
and a "deluxe" one (102 keys) with 18 function keys.
|
||||
<P>Unlike a normal XT keyboard, it is possible to send commands to it.
|
||||
The BIOS does this twice:
|
||||
(1) Command 01h makes the keyboard perform a self-test.
|
||||
(2) Command 05h makes the keyboard return a 1-byte ID. The least signficant
|
||||
bit is set for a "deluxe" layout.
|
||||
<P>The keyboard connector is DE-9 rather than DIN. Pins are:
|
||||
<PRE>
|
||||
1 KBDATA
|
||||
2 KBCLOCK
|
||||
3 GND
|
||||
4 GND
|
||||
5 +12V
|
||||
6 -RESET1
|
||||
7 Keyboard/-Typewriter
|
||||
8 TEST0
|
||||
9 +5V
|
||||
</PRE>
|
||||
|
||||
(pins 6-9 are not used by the supplied keyboards).
|
||||
<P>Attached
|
||||
<A HREF="m24kbd.png">the diagram</A>
|
||||
of the 'deluxe' keyboard, which shows its scancodes in decimal.
|
||||
<P>A mouse can be attached to the keyboard. The following is based
|
||||
on disassembling attmouse.drv from Windows 1.0.
|
||||
<P>Windows initialises the mouse by sending the following bytes to the
|
||||
keyboard: 0x12, 0x77, 0x78, 0x79, 0x00.
|
||||
The 0x12 is almost certainly a command byte; 0x77, 0x78 and 0x79 are the
|
||||
scancodes to be returned by the three mouse buttons. I don't know what the
|
||||
0x00 is for.
|
||||
<P>It then handles the following scancodes:
|
||||
0xFE -- mouse movement. The next two scancodes are delta X, then delta Y,
|
||||
in ones' complement.
|
||||
0x77, 0x78, 0x79 (and 0xF7, 0xF8, 0xF9) -- button presses / releases.
|
||||
<P>When shutting down the mouse, it sends these bytes to the keyboard:
|
||||
0x11, 0x1C, 0x53, 0x01, 0x4B, 0x4D, 0x48, 0x50, 0x02, 0x04.
|
||||
My guesses here are:
|
||||
0x11: Mouse movement becomes simulated keypresses.
|
||||
0x1C, 0x53, 0x01: Scancodes to be returned by mouse button presses.
|
||||
0x4B, 0x4D, 0x48, 0x50: Scancodes to be returned by mouse movement.
|
||||
0x02, 0x04: Don't know.
|
||||
<P>
|
||||
<H2><A NAME="telerate"></A> <A NAME="ss2.4">2.4 Telerate keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>The
|
||||
<A HREF="telerate.jpg">Telerate keyboard</A> was used
|
||||
for financial applications, as is clear from the keycaps.
|
||||
This keyboard (in the old XT version, without <B>e0</B> prefixes)
|
||||
has four additional keys, with scancodes <B>61</B>,
|
||||
<B>62</B>, <B>63</B>, <B>64</B>. The F11 and F12 keys have
|
||||
scancodes <B>54</B> and <B>55</B> (instead of the common <B>57</B>
|
||||
and <B>58</B>). There are two LEDs (for CapsLock and NumLock).
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="telerate-s.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<H2><A NAME="ss2.5">2.5 NCR keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>Also with an XT interface this
|
||||
<A HREF="ncr.jpg">NCR keyboard</A>,
|
||||
still with ten function keys on the left, but already with a separate
|
||||
block of keys between the ordinary keys and the numeric keypad.
|
||||
This middle block has on top five keys
|
||||
Ctrl (<B>1d</B>, same as the Ctrl on the left),
|
||||
Del (<B>53</B>, same as Keypad-Del/.),
|
||||
PgUp (<B>49</B>, same as Keypad-9/PgUp),
|
||||
End (<B>4f</B>, same as Keypad-1/End),
|
||||
PgDn (<B>51</B>, same as Keypad-3/PgDn), and below five cursor keys
|
||||
(<B>48</B>, same as Keypad-8/Up;
|
||||
<B>4b</B>, same as Keypad-4/Left;
|
||||
<B>47</B>, same as Keypad-7/Home;
|
||||
<B>4d</B>, same as Keypad-6/Right;
|
||||
<B>50</B>, same as Keypad-2/Down).
|
||||
Enter and Keypad-enter are both <B>1c</B>.
|
||||
Below the Enter key PrtScn/* (<B>37</B>), and below that again
|
||||
Ins (<B>52</B>, same as Keypad-0/Ins).
|
||||
CapsLock and NumLock have a built-in LED.
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="ncr-s.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="cherry80"></A> <A NAME="ss2.6">2.6 Cherry G80-0777</A>
|
||||
</H2>
|
||||
|
||||
<P>According to
|
||||
<A HREF="http://titan.informatik.uni-bonn.de/~frinke/FreeKEYB/kbdinfo.html">FreeKEYB/kbdinfo.html</A>
|
||||
this keyboard has five additional keys with scancodes
|
||||
<B>55</B> (F11), <B>56</B> (F12),
|
||||
<B>57</B> (F13), <B>58</B> (F14), <B>59</B> (F15).
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-3.html">Next</A>
|
||||
<A HREF="scancodes-1.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc2">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
64
specs/kbd/scancodes-3.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Special keyboards - Amstrad/Schneider keyboards</TITLE>
|
||||
<LINK HREF="scancodes-4.html" REL=next>
|
||||
<LINK HREF="scancodes-2.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc3" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-4.html">Next</A>
|
||||
<A HREF="scancodes-2.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc3">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Special keyboards - Amstrad/Schneider keyboards</A></H2>
|
||||
|
||||
<P><I>Since IBM had patented their keyboard design,
|
||||
Amstrad developed an entirely different keyboard.</I>
|
||||
<P>
|
||||
<H2><A NAME="ss3.1">3.1 Amstrad/Schneider PC1512</A>
|
||||
</H2>
|
||||
|
||||
<P>The
|
||||
<A HREF="amstrad.jpg">Amstrad keyboard</A>
|
||||
is entirely incompatible with XT and AT keyboards, and can be used only
|
||||
on an Amstrad; conversely, no other keyboard will work on an older Amstrad.
|
||||
This keyboard has a Del key on the keypad, and both Del-> and Del<- keys
|
||||
above the Enter key. The Del-> key has scancode <B>70</B>.
|
||||
Left of the Enter key a PrtSc/* key.
|
||||
There is an additional Enter key with scancode <B>74</B>.
|
||||
It is possible to connect a mouse and/or joystick to the keyboard,
|
||||
and then these devices also yield scancodes:
|
||||
<B>77</B> (joystick button 1), <B>78</B> (joystick button 2),
|
||||
<B>79</B> (joystick right), <B>7a</B> (joystick left),
|
||||
<B>7b</B> (joystick up), <B>7c</B> (joystick down),
|
||||
<B>7d</B> (mouse right), <B>7e</B> (mouse left).
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="amstrad-s.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<H2><A NAME="ss3.2">3.2 Amstrad/Schneider other models</A>
|
||||
</H2>
|
||||
|
||||
<P>John Elliott adds:
|
||||
<P>The above only mentions the PC1512/PC1640 style of keyboard.
|
||||
Later Amstrad XTs (PPC512, PPC640, PC20, PC200, PC2086, PC3086) used a
|
||||
102-key keyboard with the same layout and scancodes as a normal 102-key XT
|
||||
keyboard. This design is not only incompatible with normal XT and AT
|
||||
keyboards, it's also incompatible with the PC1512 keyboard. The joystick
|
||||
socket is no longer present, but mouse button clicks are still handled by
|
||||
the keyboard, with the same scancodes <B>7d</B> (right button) and
|
||||
<B>7e</B> (left button).
|
||||
<P>On the PPC512, PPC640, PC20 and PC200, the keyboard is in the same box as
|
||||
the motherboard, and is connected directly to it by ribbon cable.
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-4.html">Next</A>
|
||||
<A HREF="scancodes-2.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc3">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
41
specs/kbd/scancodes-4.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Special keyboards - AT keyboards</TITLE>
|
||||
<LINK HREF="scancodes-5.html" REL=next>
|
||||
<LINK HREF="scancodes-3.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc4" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-5.html">Next</A>
|
||||
<A HREF="scancodes-3.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc4">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="s4">4. Special keyboards - AT keyboards</A></H2>
|
||||
|
||||
<P><I>The AT keyboard adds a keyboard controller.
|
||||
The numeric keypad is now separated from the main keyboard.
|
||||
There is a single new key, with scancode 84 = <B>54</B>,
|
||||
namely SysRq.</I>
|
||||
<P>The protocol for AT and later keyboards differs from that for
|
||||
XT keyboards. Some old keyboards have an XT/AT switch on the
|
||||
backside that selects the appropriate protocol.
|
||||
Other keyboard autodetect XT or AT mode.
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="xt-at-switch.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<P>The KeyTronic KB101-1 keyboard has four switches of which the first two
|
||||
indicate the desired behaviour (00 - autodetect, 01 - unused,
|
||||
10 - PC/XT, 11 - AT). Autodetect does not always work.
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-5.html">Next</A>
|
||||
<A HREF="scancodes-3.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc4">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
1411
specs/kbd/scancodes-5.html
Normal file
304
specs/kbd/scancodes-6.html
Normal file
@@ -0,0 +1,304 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: NCD keyboards</TITLE>
|
||||
<LINK HREF="scancodes-7.html" REL=next>
|
||||
<LINK HREF="scancodes-5.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc6" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-7.html">Next</A>
|
||||
<A HREF="scancodes-5.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc6">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="NCD"></A> <A NAME="s6">6. NCD keyboards</A></H2>
|
||||
|
||||
<P>Some keyboards natively produce
|
||||
<A HREF="scancodes-9.html#scancodesets">Set 3</A> scancodes.
|
||||
When connected to a PC one will by default see translated Set 3 scancodes.
|
||||
This means that the F9 and F10 keys have make codes <B>60</B> and <B>61</B>
|
||||
and break codes <B>e0</B> and <B>e1</B>. Thus, these latter codes are
|
||||
ordinary key release codes here, not protocol codes.
|
||||
<P>The N-nnn type numbers indicate the number nnn of keys the keyboard has.
|
||||
<P>
|
||||
<H2><A NAME="e0_as_key"></A> <A NAME="ss6.1">6.1 A Japanese keyboard using e0 as ordinary scancode</A>
|
||||
</H2>
|
||||
|
||||
<P>Benjamin Carter <<CODE>bcarter@ultra5.cs.umr.edu</CODE>> reports:
|
||||
<P><I>I recently came into possession of a 97-key keyboard with Japanese
|
||||
markings on the keys. (The keys also have the standard
|
||||
qwerty-characters on them, with the exception of some of the meta-keys
|
||||
(there are 3 keys near the Alt keys on either side of the spacebar with
|
||||
only Japanese characters on them so I don't know what they are).
|
||||
In any case, the keyboard sends out scancodes that work for all the main
|
||||
keys (backspace, letters and numbers, enter, shift), but the numeric
|
||||
keypad, Alt keys, and function keys don't work.
|
||||
I have run the board through <CODE>showkey -s</CODE>, so I know what
|
||||
scancodes this keyboard sends out.
|
||||
However, the F9 and F10 keys send out <B>60</B> and <B>61</B>,
|
||||
respectively, so their key release events send out <B>e0</B>
|
||||
and <B>e1</B>, confusing the keyboard driver.</I>
|
||||
<P>(Compare this with the
|
||||
<A HREF="scancodes-9.html#correspondence">table</A>
|
||||
giving the translated Set 3 scancodes. The reported codes are
|
||||
almost identical.)
|
||||
<P># These are across the top of the keyboard.
|
||||
<P><B>58</B> (F1), <B>59</B> (F2), <B>5a</B> (F3),
|
||||
<B>5b</B> (F4), <B>5c</B> (F5), <B>5d</B> (F6),
|
||||
<B>5e</B> (F7), <B>5f</B> (F8), <B>60</B> (F9),
|
||||
<B>61</B> (F10), <B>62</B> (F11), <B>63</B> (F12)
|
||||
<P>
|
||||
<B>76</B> (Break), <B>77</B> (Setup).
|
||||
<P>
|
||||
# top row
|
||||
<P><B>64</B> (Esc),
|
||||
<B>02</B> (1), <B>03</B> (2), <B>04</B> (3),
|
||||
<B>05</B> (4), <B>06</B> (5), <B>07</B> (6),
|
||||
<B>08</B> (7), <B>09</B> (8), <B>0a</B> (9),
|
||||
<B>0b</B> (0), <B>0c</B> (-), <B>0d</B> (=),
|
||||
<B>29</B> (`), <B>0e</B> (Backspace)
|
||||
<P>
|
||||
<P># 2nd row
|
||||
<P><B>0f</B> (Tab),
|
||||
<B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
|
||||
<B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
|
||||
<B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
|
||||
<B>19</B> (P), <B>1a</B> ([), <B>1b</B> (]),
|
||||
<B>79</B> (Del), <B>6e</B> (Line Feed)
|
||||
<P>
|
||||
<P># 3rd row
|
||||
<P><B>38</B> (Ctrl),
|
||||
<B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D),
|
||||
<B>21</B> (F), <B>22</B> (G), <B>23</B> (H),
|
||||
<B>24</B> (J), <B>25</B> (K), <B>26</B> (L),
|
||||
<B>27</B> (;), <B>28</B> ('), <B>75</B> (\),
|
||||
<B>1c</B> (Return)
|
||||
<P>
|
||||
<P># 4th row
|
||||
<P><B>2a</B> (Shift_L),
|
||||
<B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C),
|
||||
<B>2f</B> (V), <B>30</B> (B), <B>31</B> (N),
|
||||
<B>32</B> (M), <B>33</B> (,), <B>34</B> (.),
|
||||
<B>35</B> (/),
|
||||
<B>3a</B> ((unknown)),
|
||||
<B>36</B> (Shift_R)
|
||||
<P>
|
||||
<P># bottom row
|
||||
<P><B>1d</B> (Caps Lock), <B>71</B> (Alt_L),
|
||||
<B>01</B> ((unknown)),
|
||||
<B>39</B> (Space),
|
||||
<B>45</B> ((unknown)),
|
||||
<B>72</B> (Alt_R),
|
||||
<B>46</B> ((unknown))
|
||||
<P>
|
||||
<P># numeric keypad. No "grey" section on the keyboard.
|
||||
<P><B>47</B> (7), <B>48</B> (8), <B>49</B> (9),
|
||||
<B>54</B> (Keypad -),
|
||||
<B>4b</B> (4), <B>4c</B> (5), <B>4d</B> (6),
|
||||
<B>37</B> (Keypad +),
|
||||
<B>4f</B> (1), <B>50</B> (2), <B>51</B> (3),
|
||||
<B>4e</B> (Keypad Enter),
|
||||
<B>52</B> (0),
|
||||
<B>78</B> (Up),
|
||||
<B>53</B> (Keypad .),
|
||||
<B>56</B> (Left),
|
||||
<B>55</B> (Down),
|
||||
<B>7d</B> (Right),
|
||||
<B>7e</B> (Keypad ,).
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss6.2">6.2 The NCD N-123NA keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="sun-type5.gif">
|
||||
</FIGURE>
|
||||
<P>There are more keyboards that do not use <B>e0</B> as escape code.
|
||||
For example, Paul Schulz <<CODE>pauls@caemrad.com.au</CODE>>
|
||||
reports the same for Sun Type 5 Keyboard with PS/2 connector,
|
||||
NCD model N-123NA. The scancodes are very similar to those given above:
|
||||
<P># Sun Keys (far left)
|
||||
<P><B>44</B> (Help),
|
||||
<B>42</B> (Stop),
|
||||
<B>40</B> (Again),
|
||||
<B>3e</B> (Props),
|
||||
<B>65</B> (Undo),
|
||||
<B>70</B> (Front),
|
||||
<B>66</B> (Copy),
|
||||
<B>67</B> (Open),
|
||||
<B>68</B> (Paste),
|
||||
<B>69</B> (Find),
|
||||
<B>6a</B> (Cut),
|
||||
<P># Top row
|
||||
<P><B>64</B> (ESC),
|
||||
<B>58</B> (F1),
|
||||
<B>59</B> (F2),
|
||||
<B>5a</B> (F3),
|
||||
<B>5b</B> (F4),
|
||||
<B>5c</B> (F5),
|
||||
<B>5d</B> (F6),
|
||||
<B>5e</B> (F7),
|
||||
<B>5f</B> (F8),
|
||||
<B>60</B> (F9),
|
||||
<B>61</B> (F10),
|
||||
<B>62</B> (F11),
|
||||
<B>63</B> (F12),
|
||||
<P># 1st row
|
||||
<P><B>29</B> (~/`),
|
||||
<B>02</B> (!/1),
|
||||
<B>03</B> (@/2),
|
||||
<B>04</B> (#/3),
|
||||
<B>05</B> ($/4),
|
||||
<B>06</B> (%/5),
|
||||
<B>07</B> (^/6),
|
||||
<B>08</B> (&/7),
|
||||
<B>09</B> (*/8),
|
||||
<B>0a</B> ((/9),
|
||||
<B>0b</B> ()/0),
|
||||
<B>0c</B> (_/-),
|
||||
<B>0d</B> (+/=),
|
||||
<B>0e</B> (BS),
|
||||
<P># 2nd row
|
||||
<P><B>0f</B> (TAB),
|
||||
<B>10</B> (Q),
|
||||
<B>11</B> (W),
|
||||
<B>12</B> (E),
|
||||
<B>13</B> (R),
|
||||
<B>14</B> (T),
|
||||
<B>15</B> (Y),
|
||||
<B>16</B> (U),
|
||||
<B>17</B> (I),
|
||||
<B>18</B> (O),
|
||||
<B>19</B> (P),
|
||||
<B>1a</B> ({/[),
|
||||
<B>1b</B> (}/]),
|
||||
<B>75</B> (|/\),
|
||||
<P># 3rd row
|
||||
<P><B>29</B> (CAPS),
|
||||
<B>30</B> (A),
|
||||
<B>31</B> (S),
|
||||
<B>32</B> (D),
|
||||
<B>33</B> (F),
|
||||
<B>34</B> (G),
|
||||
<B>35</B> (H),
|
||||
<B>36</B> (J),
|
||||
<B>37</B> (K),
|
||||
<B>38</B> (L),
|
||||
<B>39</B> (:/;),
|
||||
<B>40</B> ("/'),
|
||||
<B>28</B> (Enter),
|
||||
<P># 4th row
|
||||
<P><B>2a</B> (Shift),
|
||||
<B>2c</B> (Z),
|
||||
<B>2d</B> (X),
|
||||
<B>2e</B> (C),
|
||||
<B>2f</B> (V),
|
||||
<B>30</B> (B),
|
||||
<B>31</B> (N),
|
||||
<B>32</B> (M),
|
||||
<B>33</B> (</,),
|
||||
<B>34</B> (>/.),
|
||||
<B>35</B> (?//),
|
||||
<B>36</B> (Shift),
|
||||
<P># Bottom row
|
||||
<P><B>38</B> (Ctrl),
|
||||
<B>71</B> (Alt),
|
||||
<B>66</B> (Meta),
|
||||
<B>39</B> (Space),
|
||||
<B>6c</B> (Meta),
|
||||
<B>72</B> (Compose),
|
||||
<B>3a</B> (Alt),
|
||||
<P># To the right
|
||||
<P><B>6e</B> (PrintScreen/SysRq),
|
||||
<B>76</B> (ScrollLock),
|
||||
<B>77</B> (Pause/Break),
|
||||
<P><B>76</B> (Insert),
|
||||
<B>7f</B> (Home),
|
||||
<B>6f</B> (PageUp),
|
||||
<P><B>79</B> (Del),
|
||||
<B>7a</B> (End),
|
||||
<B>7e</B> (PageDown),
|
||||
<P><B>80</B> (.),
|
||||
<B>81</B> (.),
|
||||
<B>82</B> (.),
|
||||
<P><B>d4</B> (.),
|
||||
<B>78</B> (Up),
|
||||
<B>41</B> (.),
|
||||
<P><B>56</B> (Left),
|
||||
<B>55</B> (Down),
|
||||
<B>7d</B> (Right),
|
||||
<P># Keypad
|
||||
<P><B>6d</B> (Mute),
|
||||
<B>73</B> (Brightness/Vol Down),
|
||||
<B>74</B> (Brightness/Vol Up),
|
||||
<B>53</B> (Setup),
|
||||
<P><B>01</B> (NumLock),
|
||||
<B>45</B> (/),
|
||||
<B>46</B> (*),
|
||||
<B>54</B> (-),
|
||||
<P><B>47</B> (7/Home),
|
||||
<B>48</B> (8/Up),
|
||||
<B>4d</B> (9/PgUp),
|
||||
<B>37</B> (+),
|
||||
<P><B>4b</B> (4/Left),
|
||||
<B>4c</B> (5),
|
||||
<B>4d</B> (6/Right),
|
||||
<P><B>4f</B> (1/End),
|
||||
<B>50</B> (2/Down),
|
||||
<B>51</B> (3/PgDn),
|
||||
<B>4e</B> (Enter),
|
||||
<P><B>52</B> (0/Ins),
|
||||
<B>53</B> (./Del).
|
||||
<P>
|
||||
<H2><A NAME="ss6.3">6.3 The NCD N-123UX keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>Don Christensen reports that his NCD N-123UX keyboard
|
||||
returns scancode Set 3.
|
||||
<P>
|
||||
<H2><A NAME="NCD97"></A> <A NAME="ss6.4">6.4 The NCD N-97 keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>David Monro reports: I have a PS/2 keyboard, an NCD N-97,
|
||||
which shipped with some NCD X terminals and also with some Mips
|
||||
workstations IIRC. This keyboard returns Set 3 keycodes
|
||||
even when its told to be in Set 2. In particular, the release
|
||||
codes for F9 and F10 are <B>e0</B> and <B>e1</B>.
|
||||
The
|
||||
<A HREF="scancodes-9.html#keyboardid">keyboard ID</A> is <B>ab</B> <B>85</B>.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss6.5">6.5 NCD X terminals</A>
|
||||
</H2>
|
||||
|
||||
<P>NCD keyboards are often used with NCD X terminals.
|
||||
Here the key combinations to get into the boot monitor.
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
N-101 </TD><TD> LCtrl-LAlt-Setup </TD></TR><TR><TD>
|
||||
N-102 or Windows compatible </TD><TD> LAlt-CapsLock-Setup </TD></TR><TR><TD>
|
||||
VT220-compatible </TD><TD> Ctrl-Compose-F3 </TD></TR><TR><TD>
|
||||
N-108LK </TD><TD> Ctrl-LAlt-F3 </TD></TR><TR><TD>
|
||||
N-97 </TD><TD> LAlt-CapsLock-Setup </TD></TR><TR><TD>
|
||||
N-97 Kana and Hitachi Kana </TD><TD> LAlt-CapsLock-Setup </TD></TR><TR><TD>
|
||||
N-107 Sun type 4 compatible </TD><TD> Stop A (L1-A) </TD></TR><TR><TD>
|
||||
N-123 Sun type 5 compatible </TD><TD> Stop-A (L1-A) </TD></TR><TR><TD>
|
||||
Nokia 122 </TD><TD> </TD></TR><TR><TD>
|
||||
3270 (122-key Lexmark) </TD><TD> LShift LAlt Setup </TD></TR><TR><TD>
|
||||
</TD><TD> (on the left keypad) </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>
|
||||
<P>
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-7.html">Next</A>
|
||||
<A HREF="scancodes-5.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc6">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
164
specs/kbd/scancodes-7.html
Normal file
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<META http-equiv=Content-Type content="text/html; charset=shift_jis">
|
||||
<TITLE>Keyboard scancodes: Japanese keyboards</TITLE>
|
||||
<LINK HREF="scancodes-8.html" REL=next>
|
||||
<LINK HREF="scancodes-6.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc7" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-8.html">Next</A>
|
||||
<A HREF="scancodes-6.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc7">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="japanese"></A> <A NAME="s7">7. Japanese keyboards</A></H2>
|
||||
|
||||
<P>
|
||||
<P>
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="jp106.jpg">
|
||||
</FIGURE>
|
||||
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="jp106-with-scancodes.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<H2><A NAME="ss7.1">7.1 Japanese 86/106 keyboards</A>
|
||||
</H2>
|
||||
|
||||
<P>(Information from Barry Yip <<CODE>g609296@cc.win.or.jp</CODE>>,
|
||||
Norman Diamond, NIIBE Yutaka and H. Peter Anvin, who
|
||||
contributed the photographs of his
|
||||
JP106 keyboard above and of his
|
||||
<A HREF="jplaptop.jpg">Japanese laptop</A>.)
|
||||
<P>Common Japanese keyboards have five additional keys
|
||||
(106-key, or 86-key for a notebook; these days there may also
|
||||
be 3 extra Windows keys). These keys have scancodes
|
||||
<B>70</B> (hiragana/katakana),
|
||||
<B>73</B> (backslash/underscore),
|
||||
<B>79</B> (henkan/zenkouho),
|
||||
<B>7b</B> (muhenkan),
|
||||
<B>7d</B> (yen/vertical bar).
|
||||
<P>
|
||||
<A NAME="japusdiffs"></A>
|
||||
Different keycaps:
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
USB</TD><TD> Scancode </TD><TD>Japanese </TD><TD>US </TD><TD></TD><TD>USB</TD><TD> Scancode </TD><TD> Japanese </TD><TD>US </TD></TR><TR><TD>
|
||||
53</TD><TD><B>29</B></TD><TD>(hankaku/zenkaku)</TD><TD>(` / ~)</TD><TD></TD><TD> 47</TD><TD><B>1a</B></TD><TD>(@ / `)</TD><TD>([ / {) </TD></TR><TR><TD>
|
||||
31</TD><TD><B>03</B> </TD><TD> (2 / ") </TD><TD> (2 / @)</TD><TD></TD><TD> 48</TD><TD><B>1b</B></TD><TD>([ / {) </TD><TD>(] / }) </TD></TR><TR><TD>
|
||||
35</TD><TD><B>07</B> </TD><TD> (6 / &) </TD><TD> (6 / ^) </TD><TD></TD><TD> 51</TD><TD><B>27</B></TD><TD>(; / +) </TD><TD> (; / :) </TD></TR><TR><TD>
|
||||
36</TD><TD><B>08</B> </TD><TD> (7 / ') </TD><TD> (7 / &) </TD><TD></TD><TD> 52</TD><TD><B>28</B></TD><TD>(: / *) </TD><TD> (' / ") </TD></TR><TR><TD>
|
||||
37</TD><TD><B>09</B> </TD><TD> (8 / () </TD><TD> (8 / *) </TD><TD></TD><TD> 29</TD><TD><B>2b</B></TD><TD>(] / }) </TD><TD> (backslash / |) </TD></TR><TR><TD>
|
||||
38</TD><TD><B>0a</B> </TD><TD> (9 / )) </TD><TD> (9 / () </TD><TD></TD><TD>135</TD><TD><B>73</B></TD><TD>(backslash / _)</TD><TD> </TD></TR><TR><TD>
|
||||
39</TD><TD><B>0b</B> </TD><TD> (0 / ~)</TD><TD> (0 / )) </TD><TD></TD><TD>139</TD><TD><B>7b</B></TD><TD>(muhenkan) </TD><TD> </TD></TR><TR><TD>
|
||||
45</TD><TD><B>0c</B> </TD><TD> (- / =) </TD><TD> (- / _)</TD><TD></TD><TD>138</TD><TD><B>79</B></TD><TD>(henkan/zenkouho)</TD><TD> </TD></TR><TR><TD>
|
||||
46</TD><TD><B>0d</B> </TD><TD> (^ / overbar)</TD><TD> (= / +) </TD><TD></TD><TD>136</TD><TD><B>70</B></TD><TD>(hiragana/katakana) </TD><TD> </TD></TR><TR><TD>
|
||||
137</TD><TD><B>7d</B> </TD><TD> (\ / |) </TD><TD> </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>ASCII and JIS-Roman differ in two or three points: the code positions
|
||||
where ASCII has backslash, tilde, broken bar,
|
||||
JIS-Roman uses yen, overbar and vertical bar, respectively.
|
||||
<P>Some keyboards have the tilde printed on the keycap for the 0 key, some don't.
|
||||
Similarly, some keyboards have the backslash printed on the keycap for the _ key
|
||||
and some don't, but in all cases you need Shift to get _.
|
||||
<P>
|
||||
<H2><A NAME="ss7.2">7.2 Description of the all-Japanese keys</A>
|
||||
</H2>
|
||||
|
||||
<P>Norman Diamond adds to the previous section:
|
||||
<P><I>To the left of the spacebar,</I>
|
||||
(Shift-JIS) <20><><EFBFBD>ϊ<EFBFBD>
|
||||
<I>(muhenkan) means no conversion
|
||||
from kana to kanji. To the right of the spacebar,
|
||||
<EFBFBD>ϊ<EFBFBD>
|
||||
(henkan) means conversion from kana to kanji. In Microsoft systems
|
||||
it converts the most recently input sequence of kana to the system's
|
||||
first guess at a string of kanji/kana/etc. with the correct pronunciation
|
||||
and a guess at the meaning. Repeated keypresses change it to other
|
||||
possible guesses which are either less common or less recently used,
|
||||
depending on the situation. The shifted version of this key is
|
||||
<EFBFBD>O<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(zenkouho) which means "previous candidate" -- "zen" means "previous",
|
||||
while "kouho" means "candidate"</I> (explanation courtesy of NIIBE Yutaka)
|
||||
<I>-- it rotates back to earlier guesses for kanji conversion.
|
||||
The alt version of this key is
|
||||
<EFBFBD>S<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
also pronounced (zenkouho), which means "all candidates" -- here,
|
||||
"zen" means "all" -- it displays a menu of all known guesses.
|
||||
I never use the latter two functions of the key, because after
|
||||
pushing the henkan key about three times and not getting the desired guess,
|
||||
it displays a menu of all known guesses anyway.</I>
|
||||
<P><I>Next on the right,
|
||||
<EFBFBD>Ђ炪<EFBFBD><EFBFBD>
|
||||
(hiragana) means that
|
||||
phonetic input uses one conventional Japanese phonetic alphabet,
|
||||
which of course can be converted to kanji by pressing the henkan key later.
|
||||
The shifted version is
|
||||
<EFBFBD>J<EFBFBD>^<5E>J<EFBFBD>i
|
||||
(katakana) which means the other Japanese phonetic alphabet,
|
||||
and the alt version is
|
||||
<EFBFBD><EFBFBD><EFBFBD>[<5B>}<7D><>
|
||||
(ro-maji) which means the Roman alphabet.</I>
|
||||
<P><I>Near the upper left,
|
||||
<EFBFBD><EFBFBD>/<2F>S
|
||||
(han/zen) means switch between hankaku
|
||||
(half-size, the same size as an ASCII character) and zenkaku
|
||||
(full-size, since the amount of space occupied by a kanji
|
||||
is approximately a square, twice as fat as an ASCII character).
|
||||
It only affects katakana and a few other characters
|
||||
(for example there's a full-width copy of each ASCII character
|
||||
in addition to the single-byte half-width encodings).
|
||||
The alt version of this is
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(kanji) which
|
||||
actually causes typed Roman phonetic keys to be displayed as Japanese
|
||||
phonetic kana (either hiragana or katakana depending on one of the other
|
||||
keys described above) and doesn't cause conversion to kanji.</I>
|
||||
<P>
|
||||
<H2><A NAME="bradford"></A> <A NAME="ss7.3">7.3 A Japanese keyboard that imitates a US one</A>
|
||||
</H2>
|
||||
|
||||
<P>John Bradford reports that he has a Japanese keyboard
|
||||
(an IBM 5576 KEYBOARD-2, part number 94X1110) that by default
|
||||
simulates US key layout. Thus, pressing the @ key yields scancodes
|
||||
<B>2a</B> <B>03</B> (fake shift followed by digit 2),
|
||||
pressing Shift - yields scancodes <B>b6</B> <B>0d</B>
|
||||
(fake shift down, =) with release <B>8d</B> <B>36</B>, etc.
|
||||
<P>Thus, the (translated Set 2) scancodes can be read off the
|
||||
<A HREF="#japusdiffs">table</A> with differences between the
|
||||
Japanese and the US layout.
|
||||
<P>In this state the non-ASCII keys (Yen and overline) yield an error
|
||||
(<B>ff</B>). The Japanese keys hankaku, kanji/katakana, muhenkan,
|
||||
zenkoho/henkan, hiragana, zenmen ki, yield the codes expected from
|
||||
keys in that position on a US keyboard: <B>29</B> (`/~),
|
||||
<B>38</B> (LAlt), <B>39</B> (space), <B>39</B> (space),
|
||||
<B>39</B> (space), <B>e0</B> <B>38</B> (RAlt), respectively.
|
||||
<P>Switching the keyboard to Set 3 enables the Japanese keys.
|
||||
In untranslated Set 3 these give codes: hankaku <B>0e</B>,
|
||||
Yen <B>13</B>, overline (shift ^), kanji/katakana <B>19</B>,
|
||||
muhenkan <B>85</B>, zenkoho/henkan <B>86</B>,
|
||||
hiragana <B>87</B>, zenmen ki <B>39</B>.
|
||||
(Also: backslash/underscore <B>5c</B>, bracketright/braceright <B>53</B>.)
|
||||
<P>This is the only keyboard I know that gives more information in Set 3
|
||||
than in Set 2. It reports
|
||||
<A HREF="scancodes-9.html#keyboardid">keyboard ID</A>
|
||||
<B>ab</B> <B>90</B>.
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="imb5576-2.jpg">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-8.html">Next</A>
|
||||
<A HREF="scancodes-6.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc7">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
75
specs/kbd/scancodes-8.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Korean keyboards</TITLE>
|
||||
<LINK HREF="scancodes-9.html" REL=next>
|
||||
<LINK HREF="scancodes-7.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc8" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-9.html">Next</A>
|
||||
<A HREF="scancodes-7.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc8">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="korean"></A> <A NAME="s8">8. Korean keyboards</A></H2>
|
||||
|
||||
<P>The Korean keyboard has two keys, the Korean/Chinese
|
||||
and the Korean/English toggles, that generate scancodes
|
||||
<B>f1</B> and <B>f2</B> (respectively) when pressed,
|
||||
and nothing when released. They do not repeat.
|
||||
The keycaps are "hancha" and "han/yong" (written in Hangul).
|
||||
Hancha (hanja) means Chinese character, and Han/Yong is short for
|
||||
Hangul/Yongcha (Korean/English).
|
||||
They are located left and right of the space bar.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss8.1">8.1 An A4tech keyboard</A>
|
||||
</H2>
|
||||
|
||||
<P>Dave Willis reports on his A4tech keyboard:
|
||||
<P>Apart from the Korean Hancha and Han/Yong keys, there are on the top row:
|
||||
<P><B>e0</B> <B>5f</B> (Moon),
|
||||
<B>e0</B> <B>6c</B> (Mail),
|
||||
<B>e0</B> <B>6b</B> (Computer),
|
||||
<B>e0</B> <B>21</B> (Calculator),
|
||||
<B>e0</B> <B>6d</B> (Notes),
|
||||
<B>e0</B> <B>10</B> (Previous),
|
||||
<B>e0</B> <B>19</B> (Next),
|
||||
<B>e0</B> <B>2e</B> (Minus),
|
||||
<B>e0</B> <B>20</B> (Mute),
|
||||
<B>e0</B> <B>30</B> (Plus),
|
||||
<B>e0</B> <B>22</B> (Play/Pause),
|
||||
<B>e0</B> <B>24</B> (Stop),
|
||||
<B>e0</B> <B>65</B> (Magnifier),
|
||||
<B>e0</B> <B>32</B> (Home),
|
||||
<B>e0</B> <B>66</B> (Folder),
|
||||
<B>e0</B> <B>67</B> (recycle-style arrows),
|
||||
<B>e0</B> <B>68</B> (x).
|
||||
<P>Below mute:
|
||||
<B>e0</B> <B>62</B> (Office).
|
||||
<P>On the right hand side:
|
||||
<B>e0</B> <B>6a</B> (arrow up left),
|
||||
<B>e0</B> <B>69</B> (arrow down right),
|
||||
<B>e0</B> <B>0b</B> (wheel up),
|
||||
<B>e0</B> <B>2c</B> (wheel down),
|
||||
<B>e0</B> <B>64</B> (wheel in).
|
||||
<P>Wheel up and wheel down have no release code, only the plus and minus keys
|
||||
will repeat themselves when held down.
|
||||
<P>
|
||||
<H2><A NAME="ss8.2">8.2 The DEC LK201-K</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<FIGURE>
|
||||
<EPS FILE="absent">
|
||||
<IMG SRC="lk201-k.gif">
|
||||
</FIGURE>
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-9.html">Next</A>
|
||||
<A HREF="scancodes-7.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc8">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
403
specs/kbd/scancodes-9.html
Normal file
@@ -0,0 +1,403 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes: Keyboard-internal scancodes</TITLE>
|
||||
<LINK HREF="scancodes-10.html" REL=next>
|
||||
<LINK HREF="scancodes-8.html" REL=previous>
|
||||
<LINK HREF="scancodes.html#toc9" REL=contents>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-10.html">Next</A>
|
||||
<A HREF="scancodes-8.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc9">Contents</A>
|
||||
<HR>
|
||||
<H2><A NAME="scancodesets"></A> <A NAME="s9">9. Keyboard-internal scancodes</A></H2>
|
||||
|
||||
<P>
|
||||
<H2><A NAME="ss9.1">9.1 Three scancode sets</A>
|
||||
</H2>
|
||||
|
||||
<P>The usual PC keyboards are capable of producing three sets of scancodes.
|
||||
Writing 0xf0 followed by 1, 2 or 3 to port 0x60 will put the keyboard
|
||||
in scancode mode 1, 2 or 3. Writing 0xf0 followed by 0 queries the mode,
|
||||
resulting in a scancode byte <B>43</B>, <B>41</B> or <B>3f</B>
|
||||
from the keyboard.
|
||||
<P>Set 1 contains the values that the XT keyboard (with only one set
|
||||
of scancodes) produced, with extensions for new keys. Someone
|
||||
decided that another numbering was more logical and invented
|
||||
scancode Set 2. However, it was realized that new scancodes
|
||||
would break old programs, so the keyboard output was fed to a
|
||||
8042 microprocessor on the motherboard that could translate Set 2
|
||||
back into Set 1. Indeed a smart construction. This is the default today.
|
||||
Finally there is the PS/2 version, Set 3, more regular, but used by
|
||||
almost nobody.
|
||||
<P>(I wrote this long ago. Nowadays Linux 2.5 may try to use Set 3.
|
||||
Also certain HP machines, like the PS/2 version of the HP9000
|
||||
workstation, have used Set 3.)
|
||||
<P>Sets 2 and 3 are designed to be translated by the 8042.
|
||||
Set 1 should not be translated.
|
||||
<P>Not all keyboards support all scancode sets. For example, my MyCom
|
||||
laptop only supports scancode Set 2, and its keyboard does not react
|
||||
at all when in mode 1 or 3.
|
||||
<P>
|
||||
<H2><A NAME="ss9.2">9.2 Make and Break codes</A>
|
||||
</H2>
|
||||
|
||||
<P>The key press / key release is coded as follows:
|
||||
<P>For Set 1, if the make code of a key is <I>c</I>, the break code
|
||||
will be <I>c</I>+0x80. If the make code is <B>e0</B> <I>c</I>,
|
||||
the break code will be <B>e0</B> <I>c</I>+0x80.
|
||||
The Pause key has make code <B>e1</B> <B>1d</B> <B>45</B>
|
||||
<B>e1</B> <B>9d</B> <B>c5</B> and does not generate a break code.
|
||||
<P>For Set 2, if the make code of a key is <I>c</I>, the break code
|
||||
will be <B>f0</B> <I>c</I>. If the make code is <B>e0</B> <I>c</I>,
|
||||
the break code will be <B>e0</B> <B>f0</B> <I>c</I>.
|
||||
The Pause key has the 8-byte make code <B>e1</B> <B>14</B> <B>77</B>
|
||||
<B>e1</B> <B>f0</B> <B>14</B> <B>f0</B> <B>77</B>.
|
||||
<P>For Set 3, by default most keys do not generate a break code - only CapsLock,
|
||||
LShift, RShift, LCtrl and LAlt do. However, by default all non-traditional
|
||||
keys do generate a break code - thus, LWin, RWin, Menu do, and for example
|
||||
on the Microsoft Internet keyboard, so do Back, Forward, Stop,
|
||||
Mail, Search, Favorites, Web/Home, MyComputer, Calculator, Sleep.
|
||||
On my BTC keyboard, also the Macro key does.
|
||||
<P>In Scancode Mode 3 it is possible to enable or disable key repeat
|
||||
and the production of break codes either on a key-by-key basis
|
||||
or for all keys at once.
|
||||
And just like for Set 2, key release is indicated by a <B>f0</B> prefix
|
||||
in those cases where it is indicated.
|
||||
There is nothing special with the Pause key in scancode mode 3.
|
||||
<P>
|
||||
<H2><A NAME="ss9.3">9.3 Translation</A>
|
||||
</H2>
|
||||
|
||||
<P>The 8042 microprocessor translates the incoming byte stream produced
|
||||
by the keyboard, and turns an <B>f0</B> prefix into an OR with
|
||||
<B>80</B> for the next byte.
|
||||
<A NAME="contagious"></A>
|
||||
(Some implementations do this for the next byte that does not have
|
||||
this bit set already. A consequence is that in Set 3 the keys with Set-3
|
||||
value 0x80 or more are broken in a peculiar way: hitting such a key and
|
||||
then some other key turns the make code for this last key into a break code.
|
||||
For example the Sleep key on a Microsoft Internet keyboard generates
|
||||
<B>54</B> / <B>d4</B> for press/release. But pressing and
|
||||
releasing first Menu and then Sleep produces
|
||||
<B>8d</B> <B>8d</B> <B>d4</B> <B>d4</B> as translation of
|
||||
<B>8d</B> <B>f0</B> <B>8d</B> <B>54</B> <B>f0</B> <B>54</B>.
|
||||
Other implementations are OK.)
|
||||
<P>
|
||||
<A NAME="translationtable"></A>
|
||||
Unless told not to translate, the keyboard controller translates
|
||||
keyboard scancodes into the scancodes it returns to the CPU
|
||||
using the following table (in hex):
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
</TD><TD> 00 </TD><TD> 01 </TD><TD> 02 </TD><TD> 03 </TD><TD> 04 </TD><TD> 05 </TD><TD> 06 </TD><TD> 07 </TD><TD> 08 </TD><TD> 09 </TD><TD> 0a </TD><TD> 0b </TD><TD> 0c </TD><TD> 0d </TD><TD> 0e </TD><TD> 0f </TD></TR><TR><TD>
|
||||
</TD></TR><TR><TD>
|
||||
00 </TD><TD> ff </TD><TD> 43 </TD><TD> 41 </TD><TD> 3f </TD><TD> 3d </TD><TD> 3b </TD><TD> 3c </TD><TD> 58 </TD><TD> 64 </TD><TD> 44 </TD><TD> 42 </TD><TD> 40 </TD><TD> 3e </TD><TD> 0f </TD><TD> 29 </TD><TD> 59 </TD></TR><TR><TD>
|
||||
10 </TD><TD> 65 </TD><TD> 38 </TD><TD> 2a </TD><TD> 70 </TD><TD> 1d </TD><TD> 10 </TD><TD> 02 </TD><TD> 5a </TD><TD> 66 </TD><TD> 71 </TD><TD> 2c </TD><TD> 1f </TD><TD> 1e </TD><TD> 11 </TD><TD> 03 </TD><TD> 5b </TD></TR><TR><TD>
|
||||
20 </TD><TD> 67 </TD><TD> 2e </TD><TD> 2d </TD><TD> 20 </TD><TD> 12 </TD><TD> 05 </TD><TD> 04 </TD><TD> 5c </TD><TD> 68 </TD><TD> 39 </TD><TD> 2f </TD><TD> 21 </TD><TD> 14 </TD><TD> 13 </TD><TD> 06 </TD><TD> 5d </TD></TR><TR><TD>
|
||||
30 </TD><TD> 69 </TD><TD> 31 </TD><TD> 30 </TD><TD> 23 </TD><TD> 22 </TD><TD> 15 </TD><TD> 07 </TD><TD> 5e </TD><TD> 6a </TD><TD> 72 </TD><TD> 32 </TD><TD> 24 </TD><TD> 16 </TD><TD> 08 </TD><TD> 09 </TD><TD> 5f </TD></TR><TR><TD>
|
||||
40 </TD><TD> 6b </TD><TD> 33 </TD><TD> 25 </TD><TD> 17 </TD><TD> 18 </TD><TD> 0b </TD><TD> 0a </TD><TD> 60 </TD><TD> 6c </TD><TD> 34 </TD><TD> 35 </TD><TD> 26 </TD><TD> 27 </TD><TD> 19 </TD><TD> 0c </TD><TD> 61 </TD></TR><TR><TD>
|
||||
50 </TD><TD> 6d </TD><TD> 73 </TD><TD> 28 </TD><TD> 74 </TD><TD> 1a </TD><TD> 0d </TD><TD> 62 </TD><TD> 6e </TD><TD> 3a </TD><TD> 36 </TD><TD> 1c </TD><TD> 1b </TD><TD> 75 </TD><TD> 2b </TD><TD> 63 </TD><TD> 76 </TD></TR><TR><TD>
|
||||
60 </TD><TD> 55 </TD><TD> 56 </TD><TD> 77 </TD><TD> 78 </TD><TD> 79 </TD><TD> 7a </TD><TD> 0e </TD><TD> 7b </TD><TD> 7c </TD><TD> 4f </TD><TD> 7d </TD><TD> 4b </TD><TD> 47 </TD><TD> 7e </TD><TD> 7f </TD><TD> 6f </TD></TR><TR><TD>
|
||||
70 </TD><TD> 52 </TD><TD> 53 </TD><TD> 50 </TD><TD> 4c </TD><TD> 4d </TD><TD> 48 </TD><TD> 01 </TD><TD> 45 </TD><TD> 57 </TD><TD> 4e </TD><TD> 51 </TD><TD> 4a </TD><TD> 37 </TD><TD> 49 </TD><TD> 46 </TD><TD> 54 </TD></TR><TR><TD>
|
||||
80 </TD><TD> 80?</TD><TD> 81 </TD><TD> 82 </TD><TD> 41 </TD><TD> 54 </TD><TD> 85 </TD><TD> 86 </TD><TD> 87 </TD><TD> 88 </TD><TD> 89 </TD><TD> 8a </TD><TD> 8b </TD><TD> 8c </TD><TD> 8d </TD><TD> 8e </TD><TD> 8f </TD></TR><TR><TD>
|
||||
90 </TD><TD> 90 </TD><TD> 91 </TD><TD> 92 </TD><TD> 93 </TD><TD> 94 </TD><TD> 95 </TD><TD> 96 </TD><TD> 97 </TD><TD> 98 </TD><TD> 99 </TD><TD> 9a </TD><TD> 9b </TD><TD> 9c </TD><TD> 9d </TD><TD> 9e </TD><TD> 9f </TD></TR><TR><TD>
|
||||
a0 </TD><TD> a0 </TD><TD> a1 </TD><TD> a2 </TD><TD> a3 </TD><TD> a4 </TD><TD> a5 </TD><TD> a6 </TD><TD> a7 </TD><TD> a8 </TD><TD> a9 </TD><TD> aa </TD><TD> ab </TD><TD> ac </TD><TD> ad </TD><TD> ae </TD><TD> af </TD></TR><TR><TD>
|
||||
b0 </TD><TD> b0 </TD><TD> b1 </TD><TD> b2 </TD><TD> b3 </TD><TD> b4 </TD><TD> b5 </TD><TD> b6 </TD><TD> b7 </TD><TD> b8 </TD><TD> b9 </TD><TD> ba </TD><TD> bb </TD><TD> bc </TD><TD> bd </TD><TD> be </TD><TD> bf </TD></TR><TR><TD>
|
||||
c0 </TD><TD> c0 </TD><TD> c1 </TD><TD> c2 </TD><TD> c3 </TD><TD> c4 </TD><TD> c5 </TD><TD> c6 </TD><TD> c7 </TD><TD> c8 </TD><TD> c9 </TD><TD> ca </TD><TD> cb </TD><TD> cc </TD><TD> cd </TD><TD> ce </TD><TD> cf </TD></TR><TR><TD>
|
||||
d0 </TD><TD> d0 </TD><TD> d1 </TD><TD> d2 </TD><TD> d3 </TD><TD> d4 </TD><TD> d5?</TD><TD> d6 </TD><TD> d7 </TD><TD> d8 </TD><TD> d9?</TD><TD> da?</TD><TD> db </TD><TD> dc </TD><TD> dd </TD><TD> de </TD><TD> df </TD></TR><TR><TD>
|
||||
e0 </TD><TD> e0 </TD><TD> e1 </TD><TD> e2 </TD><TD> e3 </TD><TD> e4 </TD><TD> e5 </TD><TD> e6 </TD><TD> e7 </TD><TD> e8 </TD><TD> e9 </TD><TD> ea </TD><TD> eb </TD><TD> ec </TD><TD> ed </TD><TD> ee </TD><TD> ef?</TD></TR><TR><TD>
|
||||
f0 </TD><TD> - </TD><TD> f1?</TD><TD> f2?</TD><TD> f3?</TD><TD> f4?</TD><TD> f5?</TD><TD> f6?</TD><TD> f7?</TD><TD> f8?</TD><TD> f9?</TD><TD> fa?</TD><TD> fb?</TD><TD> fc?</TD><TD> fd?</TD><TD> fe?</TD><TD> ff </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>A reference for the first half of this table is the book by Gary J Konzak
|
||||
<I>PC 8042 Controller</I>, ISBN 0-929392-21-3.
|
||||
(Report by <CODE>vojtech@suse.cz</CODE>.)
|
||||
<P>A way to check this table is: (i) put the keyboard in untranslated modes
|
||||
1, 2, 3 and look at the
|
||||
<A HREF="table.h">resulting values</A>,
|
||||
and (ii) put the keyboard in translated scancode modes 1, 2, 3. Now compare
|
||||
the values. The entries with question marks were not checked in this way.
|
||||
<P>Note that the range <B>01</B>-<B>7f</B> of this table is 1-1.
|
||||
In the second half of the table, translated and untranslated values
|
||||
are equal in all known cases, with the two exceptions <B>83</B> and <B>84</B>.
|
||||
<P>One asks the controller to transmit untranslated scancodes by writing
|
||||
a keyboard controller command with bit 5 set and bit 6 cleared.
|
||||
E.g., use the command byte <B>45</B> to get translated codes,
|
||||
and <B>24</B> to get untranslated codes that do not cause interrupts.
|
||||
<P>
|
||||
<H3>Effects of translation</H3>
|
||||
|
||||
<P>
|
||||
<H3>Origin of strange scan code set values</H3>
|
||||
|
||||
<P>The keyboard command <B>f0</B> with argument 1, 2 or 3
|
||||
sets the current scancode set, and this same command
|
||||
with argument 0 asks for the current scancode set.
|
||||
The reply is <B>43</B>, <B>41</B> or <B>3f</B>
|
||||
for sets 1, 2, 3. Why? Because in reality the reply is 1, 2 or 3,
|
||||
and that is what one sees when translation is off. But translation
|
||||
turns these into <B>43</B>, <B>41</B>, <B>3f</B>.
|
||||
<P>
|
||||
<H3><A NAME="keyboardid"></A> Keyboard IDs</H3>
|
||||
|
||||
<P>Keyboards do report an ID as a reply to the command
|
||||
<B>
|
||||
<A HREF="scancodes-11.html#kcf2">f2</A></B>.
|
||||
(An XT keyboard does not reply, an AT keyboard only replies with an ACK.)
|
||||
An MF2 AT keyboard reports ID <B>ab</B> <B>83</B>.
|
||||
Translation turns this into <B>ab</B> <B>41</B>.
|
||||
<P>Many short keyboards, like IBM ThinkPads, and Spacesaver keyboards,
|
||||
send <B>ab</B> <B>84</B> untranslated,
|
||||
which becomes <B>ab</B> <B>54</B> translated.
|
||||
(The netbsd source has a misunderstanding here, and seems to associate
|
||||
the <B>54</B> and <B>84</B> to the ThinkPad model - cf. the defines
|
||||
KEYB_R_MF2ID2TP75X, KEYB_R_MF2ID2TP76X.)
|
||||
<P>Several 122-key keyboards are reported to send <B>ab</B> <B>86</B>.
|
||||
Here translated and untranslated values coincide.
|
||||
(Reports mention "122-Key Enhanced Keyboard", "standard 122-key keyboard",
|
||||
"122 Key Mainframe Interactive (MFI) Keyboard".)
|
||||
<P>David Monro reports <B>ab</B> <B>85</B> for a
|
||||
<A HREF="scancodes-6.html#NCD97">NCD N-97</A> keyboard.
|
||||
Tim Clarke reports <B>ab</B> <B>85</B> for the
|
||||
"122-Key Host Connect(ed) Keyboard".
|
||||
<P>He also reports
|
||||
<I>Also, when playing with my KVM problems Belkin gave me a
|
||||
105-key Windows keyboard which Id.s itself as 18ABh</I>.
|
||||
<P>Linux 2.5.25 kernel source has 0xaca1 for a
|
||||
"NCD Sun layout keyboard". It also mentions 0xab02 and 0xab7f,
|
||||
but these arise as (mistaken) back translations from
|
||||
<B>ab</B> <B>41</B> and <B>ab</B> <B>54</B>.
|
||||
<P>Ralph Brown's Interrupt list mentions "old Japanese 'G', 'P', 'A' keyboards",
|
||||
with keyboard IDs <B>ab</B> <B>90</B>, <B>ab</B> <B>91</B>,
|
||||
<B>ab</B> <B>92</B>. Here translated and untranslated versions
|
||||
coincide. ID <B>ab</B> <B>90</B> was also mentioned
|
||||
<A HREF="scancodes-7.html#bradford">above</A>.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss9.4">9.4 Correspondence</A>
|
||||
</H2>
|
||||
|
||||
<P>For the traditional keys the correspondence is fairly clear:
|
||||
above we saw the
|
||||
<A HREF="#translationtable">translation table</A>,
|
||||
and Set 1 equals translated Set 2, and Set 3 equals Set 2 in most cases
|
||||
where Set 2 has a single (non-escaped) scancode,
|
||||
and in any case the correspondence is constant (and given
|
||||
<A HREF="#correspondence">below</A>).
|
||||
<P>On the other hand, modern keyboards have all kinds of multimedia
|
||||
and other additional keys, and what happens for them is completely
|
||||
random, and varies from keyboard to keyboard.
|
||||
<P>Let us look at an example.
|
||||
<P>The
|
||||
<A HREF="scancodes-5.html#msinternet">Microsoft Internet keyboard</A>
|
||||
has keys Search, Favorites, Stop, Forward, Back, My Computer,
|
||||
Mail, Web / Home, Calculator with translated Set 3 scancodes
|
||||
<B>65</B>, <B>66</B>, <B>68</B>, <B>69</B>, <B>6a</B>,
|
||||
<B>6b</B>, <B>6c</B>, <B>97</B>, <B>99</B>, respectively,
|
||||
and translated Set 2 scancodes <B>e0</B> <I>xx</I>, with
|
||||
<I>xx</I> = <B>65</B>, <B>66</B>, <B>68</B>, <B>69</B>,
|
||||
<B>6a</B>, <B>6b</B>, <B>6c</B>, <B>32</B>, <B>21</B>.
|
||||
<P>On the other hand, the
|
||||
<A HREF="scancodes-5.html#ibmrapidaccessii">IBM Rapid Access II keyboard</A>
|
||||
has keys CD stop, CD play, Volume D, Volume U, CD back, CD fwd
|
||||
with translated Set 3 scancodes
|
||||
<B>69</B>, <B>6a</B>, <B>6b</B>, <B>6c</B>, <B>6d</B>, <B>44</B>,
|
||||
and translated Set 2 scancodes <B>e0</B> <I>xx</I>, with
|
||||
<I>xx</I> = <B>20</B>, <B>22</B>, <B>21</B>, <B>23</B>,
|
||||
<B>24</B>, <B>12</B>.
|
||||
<P>Thus, different keyboards have different mappings between Set 2
|
||||
and Set 3 codes.
|
||||
<P>
|
||||
<H2><A NAME="ss9.5">9.5 Use</A>
|
||||
</H2>
|
||||
|
||||
<P>Can these other scancode sets be used? Probably not.
|
||||
<P>() Translated scancode Set 1 has weird codes that nobody wants to use.
|
||||
<P>(i) My MyCom laptop does not support scancode sets 1 and 3 at all.
|
||||
<P>(ii) Some laptops have special key combinations that bring one
|
||||
into a setup or configuration utility. It is impossible to do
|
||||
anything useful, or to get out of it again, when the scancode mode
|
||||
is not translated Set 2.
|
||||
<P>(iii) Many keyboards have bugs in scancode sets 1 and/or 3 but
|
||||
are fine in scancode Set 2.
|
||||
Vojtech Pavlik reports that his BTC keyboard has the same codes
|
||||
for the '1' and '2' keys in Set3, both having the code for '1').
|
||||
On my BTC keyboard the key up value for Esc and 1 are both <B>ff</B>
|
||||
in scancode Set 1. My Safeway keyboard has untranslated Set 1 equal
|
||||
to translated Set 2, except for the multimedia keys, where
|
||||
untranslated Set 1 equals untranslated Set 2.
|
||||
<P>(iv) A big advantage of Set 3 is that each key generates a unique code
|
||||
so that one does not need to parse sequences. However, the BTC keyboard
|
||||
mentioned
|
||||
<A HREF="scancodes-5.html#BTC">above</A> generates <B>e0</B> <B>6f</B>
|
||||
for its Macro key also in scancode mode 3. The Safeway keyboard mentioned
|
||||
<A HREF="scancodes-5.html#safeway23">above</A> does not generate any codes
|
||||
for its multimedia keys in scancode mode 3.
|
||||
<P>(v) Some keyboard controllers cannot handle Set 3 values that are
|
||||
larger than 0x7f, and give
|
||||
<A HREF="#contagious">peculiar results</A>
|
||||
for e.g. the Windows keys in translated scancode mode 3.
|
||||
The result is that the following key is "eaten": the key down action
|
||||
turns into a key up.
|
||||
<P>(vi) The USB legacy support only supports translated Set 2.
|
||||
<P>(vii) The
|
||||
<A HREF="http://www.microsoft.com/hwdev/download/desinit/scancode.zip">Microsoft Keyboard Scan Code Specification</A> writes:
|
||||
<I>In the very early days of Windows NT, an attempt was made
|
||||
to use the much more orthogonal Scan Code Set 3, but due to bugs
|
||||
in the implementation of this Scan Code Set on numerous OEM
|
||||
keyboards, the idea was abandoned.</I>
|
||||
And also: <I>Scan Code Set 3 is not used or required for operation
|
||||
of Microsoft operating systems.</I>
|
||||
<P>(viii) Others also tried Set 3. The PS/2 version of the HP9000
|
||||
workstation uses it. This is fine with HP's keyboards but causes
|
||||
some problems with foreign keyboards.
|
||||
<P>(ix) It is said that Hal Snyder of Mark Williams, Co remarked:
|
||||
"We find that about 10% of cheap no-name keyboards do not work
|
||||
in scan code set 3".
|
||||
<P>(x) These days Linux probes the keyboard, and may try to enable Set 3.
|
||||
This is good for learning a lot about strange keyboards.
|
||||
It is bad for having a stable system that just works.
|
||||
<P>
|
||||
<H2><A NAME="correspondence"></A> <A NAME="ss9.6">9.6 A table</A>
|
||||
</H2>
|
||||
|
||||
<P>(USB codes in decimal, scancodes in hex.)
|
||||
<P>
|
||||
<P>
|
||||
<CENTER><TABLE BORDER><TR><TD>
|
||||
# </TD><TD> USB </TD><TD> Set 1 </TD><TD> X(Set 1) </TD><TD> Set 2 </TD><TD> X(Set 2) </TD><TD> Set 3 </TD><TD> X(Set 3) </TD><TD> keycap </TD></TR><TR><TD>
|
||||
1 </TD><TD> 53 </TD><TD> 29 </TD><TD> 39 </TD><TD> 0e </TD><TD> 29 </TD><TD> 0e </TD><TD> 29 </TD><TD> ` ~ </TD></TR><TR><TD>
|
||||
2 </TD><TD> 30 </TD><TD> 02 </TD><TD> 41 </TD><TD> 16 </TD><TD> 02 </TD><TD> 16 </TD><TD> 02 </TD><TD> 1 ! </TD></TR><TR><TD>
|
||||
3 </TD><TD> 31 </TD><TD> 03 </TD><TD> 3f </TD><TD> 1e </TD><TD> 03 </TD><TD> 1e </TD><TD> 03 </TD><TD> 2 @ </TD></TR><TR><TD>
|
||||
4 </TD><TD> 32 </TD><TD> 04 </TD><TD> 3d </TD><TD> 26 </TD><TD> 04 </TD><TD> 26 </TD><TD> 04 </TD><TD> 3 # </TD></TR><TR><TD>
|
||||
5 </TD><TD> 33 </TD><TD> 05 </TD><TD> 3b </TD><TD> 25 </TD><TD> 05 </TD><TD> 25 </TD><TD> 05 </TD><TD> 4 $ </TD></TR><TR><TD>
|
||||
6 </TD><TD> 34 </TD><TD> 06 </TD><TD> 3c </TD><TD> 2e </TD><TD> 06 </TD><TD> 2e </TD><TD> 06 </TD><TD> 5 % E </TD></TR><TR><TD>
|
||||
7 </TD><TD> 35 </TD><TD> 07 </TD><TD> 58 </TD><TD> 36 </TD><TD> 07 </TD><TD> 36 </TD><TD> 07 </TD><TD> 6 ^ </TD></TR><TR><TD>
|
||||
8 </TD><TD> 36 </TD><TD> 08 </TD><TD> 64 </TD><TD> 3d </TD><TD> 08 </TD><TD> 3d </TD><TD> 08 </TD><TD> 7 & </TD></TR><TR><TD>
|
||||
9 </TD><TD> 37 </TD><TD> 09 </TD><TD> 44 </TD><TD> 3e </TD><TD> 09 </TD><TD> 3e </TD><TD> 09 </TD><TD> 8 * </TD></TR><TR><TD>
|
||||
10 </TD><TD> 38 </TD><TD> 0a </TD><TD> 42 </TD><TD> 46 </TD><TD> 0a </TD><TD> 46 </TD><TD> 0a </TD><TD> 9 ( </TD></TR><TR><TD>
|
||||
11 </TD><TD> 39 </TD><TD> 0b </TD><TD> 40 </TD><TD> 45 </TD><TD> 0b </TD><TD> 45 </TD><TD> 0b </TD><TD> 0 ) </TD></TR><TR><TD>
|
||||
12 </TD><TD> 45 </TD><TD> 0c </TD><TD> 3e </TD><TD> 4e </TD><TD> 0c </TD><TD> 4e </TD><TD> 0c </TD><TD> - _ </TD></TR><TR><TD>
|
||||
13 </TD><TD> 46 </TD><TD> 0d </TD><TD> 0f </TD><TD> 55 </TD><TD> 0d </TD><TD> 55 </TD><TD> 0d </TD><TD> = + </TD></TR><TR><TD>
|
||||
15 </TD><TD> 42 </TD><TD> 0e </TD><TD> 29 </TD><TD> 66 </TD><TD> 0e </TD><TD> 66 </TD><TD> 0e </TD><TD> Backspace </TD></TR><TR><TD>
|
||||
16 </TD><TD> 43 </TD><TD> 0f </TD><TD> 59 </TD><TD> 0d </TD><TD> 0f </TD><TD> 0d </TD><TD> 0f </TD><TD> Tab </TD></TR><TR><TD>
|
||||
17 </TD><TD> 20 </TD><TD> 10 </TD><TD> 65 </TD><TD> 15 </TD><TD> 10 </TD><TD> 15 </TD><TD> 10 </TD><TD> Q </TD></TR><TR><TD>
|
||||
18 </TD><TD> 26 </TD><TD> 11 </TD><TD> 38 </TD><TD> 1d </TD><TD> 11 </TD><TD> 1d </TD><TD> 11 </TD><TD> W </TD></TR><TR><TD>
|
||||
19 </TD><TD> 8 </TD><TD> 12 </TD><TD> 2a </TD><TD> 24 </TD><TD> 12 </TD><TD> 24 </TD><TD> 12 </TD><TD> E </TD></TR><TR><TD>
|
||||
20 </TD><TD> 21 </TD><TD> 13 </TD><TD> 70 </TD><TD> 2d </TD><TD> 13 </TD><TD> 2d </TD><TD> 13 </TD><TD> R </TD></TR><TR><TD>
|
||||
21 </TD><TD> 23 </TD><TD> 14 </TD><TD> 1d </TD><TD> 2c </TD><TD> 14 </TD><TD> 2c </TD><TD> 14 </TD><TD> T </TD></TR><TR><TD>
|
||||
22 </TD><TD> 28 </TD><TD> 15 </TD><TD> 10 </TD><TD> 35 </TD><TD> 15 </TD><TD> 35 </TD><TD> 15 </TD><TD> Y </TD></TR><TR><TD>
|
||||
23 </TD><TD> 24 </TD><TD> 16 </TD><TD> 02 </TD><TD> 3c </TD><TD> 16 </TD><TD> 3c </TD><TD> 16 </TD><TD> U </TD></TR><TR><TD>
|
||||
24 </TD><TD> 12 </TD><TD> 17 </TD><TD> 5a </TD><TD> 43 </TD><TD> 17 </TD><TD> 43 </TD><TD> 17 </TD><TD> I </TD></TR><TR><TD>
|
||||
25 </TD><TD> 18 </TD><TD> 18 </TD><TD> 66 </TD><TD> 44 </TD><TD> 18 </TD><TD> 44 </TD><TD> 18 </TD><TD> O </TD></TR><TR><TD>
|
||||
26 </TD><TD> 19 </TD><TD> 19 </TD><TD> 71 </TD><TD> 4d </TD><TD> 19 </TD><TD> 4d </TD><TD> 19 </TD><TD> P </TD></TR><TR><TD>
|
||||
27 </TD><TD> 47 </TD><TD> 1a </TD><TD> 2c </TD><TD> 54 </TD><TD> 1a </TD><TD> 54 </TD><TD> 1a </TD><TD> [ { </TD></TR><TR><TD>
|
||||
28 </TD><TD> 48 </TD><TD> 1b </TD><TD> 1f </TD><TD> 5b </TD><TD> 1b </TD><TD> 5b </TD><TD> 1b </TD><TD> ] } </TD></TR><TR><TD>
|
||||
29 </TD><TD> 49 </TD><TD> 2b </TD><TD> 21 </TD><TD> 5d </TD><TD> 2b </TD><TD> 5c </TD><TD> 75 </TD><TD> \ | </TD></TR><TR><TD>
|
||||
30 </TD><TD> 57 </TD><TD> 3a </TD><TD> 32 </TD><TD> 58 </TD><TD> 3a </TD><TD> 14 </TD><TD> 1d </TD><TD> CapsLock </TD></TR><TR><TD>
|
||||
31 </TD><TD> 4 </TD><TD> 1e </TD><TD> 03 </TD><TD> 1c </TD><TD> 1e </TD><TD> 1c </TD><TD> 1e </TD><TD> A </TD></TR><TR><TD>
|
||||
32 </TD><TD> 22 </TD><TD> 1f </TD><TD> 5b </TD><TD> 1b </TD><TD> 1f </TD><TD> 1b </TD><TD> 1f </TD><TD> S </TD></TR><TR><TD>
|
||||
33 </TD><TD> 7 </TD><TD> 20 </TD><TD> 67 </TD><TD> 23 </TD><TD> 20 </TD><TD> 23 </TD><TD> 20 </TD><TD> D </TD></TR><TR><TD>
|
||||
34 </TD><TD> 9 </TD><TD> 21 </TD><TD> 2e </TD><TD> 2b </TD><TD> 21 </TD><TD> 2b </TD><TD> 21 </TD><TD> F </TD></TR><TR><TD>
|
||||
35 </TD><TD> 10 </TD><TD> 22 </TD><TD> 2d </TD><TD> 34 </TD><TD> 22 </TD><TD> 34 </TD><TD> 22 </TD><TD> G </TD></TR><TR><TD>
|
||||
36 </TD><TD> 11 </TD><TD> 23 </TD><TD> 20 </TD><TD> 33 </TD><TD> 23 </TD><TD> 33 </TD><TD> 23 </TD><TD> H </TD></TR><TR><TD>
|
||||
37 </TD><TD> 13 </TD><TD> 24 </TD><TD> 12 </TD><TD> 3b </TD><TD> 24 </TD><TD> 3b </TD><TD> 24 </TD><TD> J </TD></TR><TR><TD>
|
||||
38 </TD><TD> 14 </TD><TD> 25 </TD><TD> 05 </TD><TD> 42 </TD><TD> 25 </TD><TD> 42 </TD><TD> 25 </TD><TD> K </TD></TR><TR><TD>
|
||||
39 </TD><TD> 15 </TD><TD> 26 </TD><TD> 04 </TD><TD> 4b </TD><TD> 26 </TD><TD> 4b </TD><TD> 26 </TD><TD> L </TD></TR><TR><TD>
|
||||
40 </TD><TD> 51 </TD><TD> 27 </TD><TD> 5c </TD><TD> 4c </TD><TD> 27 </TD><TD> 4c </TD><TD> 27 </TD><TD> ; : </TD></TR><TR><TD>
|
||||
41 </TD><TD> 52 </TD><TD> 28 </TD><TD> 68 </TD><TD> 52 </TD><TD> 28 </TD><TD> 52 </TD><TD> 28 </TD><TD> ' " </TD></TR><TR><TD>
|
||||
42 </TD><TD> 50 </TD><TD> 00 </TD><TD> ff </TD><TD> 00 </TD><TD> ff </TD><TD> 00 </TD><TD> ff </TD><TD> non-US-1 </TD></TR><TR><TD>
|
||||
43 </TD><TD> 40 </TD><TD> 1c </TD><TD> 1e </TD><TD> 5a </TD><TD> 1c </TD><TD> 5a </TD><TD> 1c </TD><TD> Enter </TD></TR><TR><TD>
|
||||
44 </TD><TD> 225 </TD><TD> 2a </TD><TD> 2f </TD><TD> 12 </TD><TD> 2a </TD><TD> 12 </TD><TD> 2a </TD><TD> LShift </TD></TR><TR><TD>
|
||||
46 </TD><TD> 29 </TD><TD> 2c </TD><TD> 14 </TD><TD> 1a </TD><TD> 2c </TD><TD> 1a </TD><TD> 2c </TD><TD> Z </TD></TR><TR><TD>
|
||||
47 </TD><TD> 27 </TD><TD> 2d </TD><TD> 13 </TD><TD> 22 </TD><TD> 2d </TD><TD> 22 </TD><TD> 2d </TD><TD> X </TD></TR><TR><TD>
|
||||
48 </TD><TD> 6 </TD><TD> 2e </TD><TD> 06 </TD><TD> 21 </TD><TD> 2e </TD><TD> 21 </TD><TD> 2e </TD><TD> C </TD></TR><TR><TD>
|
||||
49 </TD><TD> 25 </TD><TD> 2f </TD><TD> 5d </TD><TD> 2a </TD><TD> 2f </TD><TD> 2a </TD><TD> 2f </TD><TD> V </TD></TR><TR><TD>
|
||||
50 </TD><TD> 5 </TD><TD> 30 </TD><TD> 69 </TD><TD> 32 </TD><TD> 30 </TD><TD> 32 </TD><TD> 30 </TD><TD> B </TD></TR><TR><TD>
|
||||
51 </TD><TD> 17 </TD><TD> 31 </TD><TD> 31 </TD><TD> 31 </TD><TD> 31 </TD><TD> 31 </TD><TD> 31 </TD><TD> N </TD></TR><TR><TD>
|
||||
52 </TD><TD> 16 </TD><TD> 32 </TD><TD> 30 </TD><TD> 3a </TD><TD> 32 </TD><TD> 3a </TD><TD> 32 </TD><TD> M </TD></TR><TR><TD>
|
||||
53 </TD><TD> 54 </TD><TD> 33 </TD><TD> 23 </TD><TD> 41 </TD><TD> 33 </TD><TD> 41 </TD><TD> 33 </TD><TD> , < </TD></TR><TR><TD>
|
||||
54 </TD><TD> 55 </TD><TD> 34 </TD><TD> 22 </TD><TD> 49 </TD><TD> 34 </TD><TD> 49 </TD><TD> 34 </TD><TD> . > </TD></TR><TR><TD>
|
||||
55 </TD><TD> 56 </TD><TD> 35 </TD><TD> 15 </TD><TD> 4a </TD><TD> 35 </TD><TD> 4a </TD><TD> 35 </TD><TD> / ? </TD></TR><TR><TD>
|
||||
57 </TD><TD> 229 </TD><TD> 36 </TD><TD> 07 </TD><TD> 59 </TD><TD> 36 </TD><TD> 59 </TD><TD> 36 </TD><TD> RShift </TD></TR><TR><TD>
|
||||
58 </TD><TD> 224 </TD><TD> 1d </TD><TD> 11 </TD><TD> 14 </TD><TD> 1d </TD><TD> 11 </TD><TD> 38 </TD><TD> LCtrl </TD></TR><TR><TD>
|
||||
60 </TD><TD> 226 </TD><TD> 38 </TD><TD> 6a </TD><TD> 11 </TD><TD> 38 </TD><TD> 19 </TD><TD> 71 </TD><TD> LAlt </TD></TR><TR><TD>
|
||||
61 </TD><TD> 44 </TD><TD> 39 </TD><TD> 72 </TD><TD> 29 </TD><TD> 39 </TD><TD> 29 </TD><TD> 39 </TD><TD> space </TD></TR><TR><TD>
|
||||
62 </TD><TD> 230 </TD><TD> e0-38 </TD><TD> e0-6a </TD><TD> e0-11 </TD><TD> e0-38 </TD><TD> 39 </TD><TD> 72 </TD><TD> RAlt </TD></TR><TR><TD>
|
||||
64 </TD><TD> 228 </TD><TD> e0-1d </TD><TD> e0-11 </TD><TD> e0-14 </TD><TD> e0-1d </TD><TD> 58 </TD><TD> 3a </TD><TD> RCtrl </TD></TR><TR><TD>
|
||||
75 </TD><TD> 73 </TD><TD> e0-52 </TD><TD> e0-28 </TD><TD> e0-70 </TD><TD> e0-52 </TD><TD> 67 </TD><TD> 7b </TD><TD> Insert </TD></TR><TR><TD>
|
||||
76 </TD><TD> 76 </TD><TD> e0-53 </TD><TD> e0-74 </TD><TD> e0-71 </TD><TD> e0-53 </TD><TD> 64 </TD><TD> 79 </TD><TD> Delete </TD></TR><TR><TD>
|
||||
80 </TD><TD> 74 </TD><TD> e0-47 </TD><TD> e0-60 </TD><TD> e0-6c </TD><TD> e0-47 </TD><TD> 6e </TD><TD> 7f </TD><TD> Home </TD></TR><TR><TD>
|
||||
81 </TD><TD> 77 </TD><TD> e0-4f </TD><TD> e0-61 </TD><TD> e0-69 </TD><TD> e0-4f </TD><TD> 65 </TD><TD> 7a </TD><TD> End </TD></TR><TR><TD>
|
||||
85 </TD><TD> 75 </TD><TD> e0-49 </TD><TD> e0-34 </TD><TD> e0-7d </TD><TD> e0-49 </TD><TD> 6f </TD><TD> 6f </TD><TD> PgUp </TD></TR><TR><TD>
|
||||
86 </TD><TD> 78 </TD><TD> e0-51 </TD><TD> e0-73 </TD><TD> e0-7a </TD><TD> e0-51 </TD><TD> 6d </TD><TD> 7e </TD><TD> PgDn </TD></TR><TR><TD>
|
||||
79 </TD><TD> 80 </TD><TD> e0-4b </TD><TD> e0-26 </TD><TD> e0-6b </TD><TD> e0-4b </TD><TD> 61 </TD><TD> 56 </TD><TD> Left </TD></TR><TR><TD>
|
||||
83 </TD><TD> 82 </TD><TD> e0-48 </TD><TD> e0-6c </TD><TD> e0-75 </TD><TD> e0-48 </TD><TD> 63 </TD><TD> 78 </TD><TD> Up </TD></TR><TR><TD>
|
||||
84 </TD><TD> 81 </TD><TD> e0-50 </TD><TD> e0-6d </TD><TD> e0-72 </TD><TD> e0-50 </TD><TD> 60 </TD><TD> 55 </TD><TD> Down </TD></TR><TR><TD>
|
||||
89 </TD><TD> 79 </TD><TD> e0-4d </TD><TD> e0-19 </TD><TD> e0-74 </TD><TD> e0-4d </TD><TD> 6a </TD><TD> 7d </TD><TD> Right </TD></TR><TR><TD>
|
||||
90 </TD><TD> 83 </TD><TD> 45 </TD><TD> 0b </TD><TD> 77 </TD><TD> 45 </TD><TD> 76 </TD><TD> 01 </TD><TD> NumLock </TD></TR><TR><TD>
|
||||
91 </TD><TD> 95 </TD><TD> 47 </TD><TD> 60 </TD><TD> 6c </TD><TD> 47 </TD><TD> 6c </TD><TD> 47 </TD><TD> KP-7 / Home </TD></TR><TR><TD>
|
||||
92 </TD><TD> 92 </TD><TD> 4b </TD><TD> 26 </TD><TD> 6b </TD><TD> 4b </TD><TD> 6b </TD><TD> 4b </TD><TD> KP-4 / Left </TD></TR><TR><TD>
|
||||
93 </TD><TD> 89 </TD><TD> 4f </TD><TD> 61 </TD><TD> 69 </TD><TD> 4f </TD><TD> 69 </TD><TD> 4f </TD><TD> KP-1 / End </TD></TR><TR><TD>
|
||||
95 </TD><TD> 84 </TD><TD> e0-35 </TD><TD> e0-15 </TD><TD> e0-4a </TD><TD> e0-35 </TD><TD> 77 </TD><TD> 45 </TD><TD> KP-/ </TD></TR><TR><TD>
|
||||
96 </TD><TD> 96 </TD><TD> 48 </TD><TD> 6c </TD><TD> 75 </TD><TD> 48 </TD><TD> 75 </TD><TD> 48 </TD><TD> KP-8 / Up </TD></TR><TR><TD>
|
||||
97 </TD><TD> 93 </TD><TD> 4c </TD><TD> 27 </TD><TD> 73 </TD><TD> 4c </TD><TD> 73 </TD><TD> 4c </TD><TD> KP-5 </TD></TR><TR><TD>
|
||||
98 </TD><TD> 90 </TD><TD> 50 </TD><TD> 6d </TD><TD> 72 </TD><TD> 50 </TD><TD> 72 </TD><TD> 50 </TD><TD> KP-2 / Down </TD></TR><TR><TD>
|
||||
99 </TD><TD> 98 </TD><TD> 52 </TD><TD> 28 </TD><TD> 70 </TD><TD> 52 </TD><TD> 70 </TD><TD> 52 </TD><TD> KP-0 / Ins </TD></TR><TR><TD>
|
||||
100 </TD><TD> 85 </TD><TD> 37 </TD><TD> 5e </TD><TD> 7c </TD><TD> 37 </TD><TD> 7e </TD><TD> 46 </TD><TD> KP-* </TD></TR><TR><TD>
|
||||
101 </TD><TD> 97 </TD><TD> 49 </TD><TD> 34 </TD><TD> 7d </TD><TD> 49 </TD><TD> 7d </TD><TD> 49 </TD><TD> KP-9 / PgUp </TD></TR><TR><TD>
|
||||
102 </TD><TD> 94 </TD><TD> 4d </TD><TD> 19 </TD><TD> 74 </TD><TD> 4d </TD><TD> 74 </TD><TD> 4d </TD><TD> KP-6 / Right </TD></TR><TR><TD>
|
||||
103 </TD><TD> 91 </TD><TD> 51 </TD><TD> 73 </TD><TD> 7a </TD><TD> 51 </TD><TD> 7a </TD><TD> 51 </TD><TD> KP-3 / PgDn </TD></TR><TR><TD>
|
||||
104 </TD><TD> 99 </TD><TD> 53 </TD><TD> 74 </TD><TD> 71 </TD><TD> 53 </TD><TD> 71 </TD><TD> 53 </TD><TD> KP-. / Del </TD></TR><TR><TD>
|
||||
105 </TD><TD> 86 </TD><TD> 4a </TD><TD> 35 </TD><TD> 7b </TD><TD> 4a </TD><TD> 84 </TD><TD> 54 </TD><TD> KP-- </TD></TR><TR><TD>
|
||||
106 </TD><TD> 87 </TD><TD> 4e </TD><TD> 0c </TD><TD> 79 </TD><TD> 4e </TD><TD> 7c </TD><TD> 37 </TD><TD> KP-+ </TD></TR><TR><TD>
|
||||
108 </TD><TD> 88 </TD><TD> e0-1c </TD><TD> e0-1e </TD><TD> e0-5a </TD><TD> e0-1c </TD><TD> 79 </TD><TD> 4e </TD><TD> KP-Enter </TD></TR><TR><TD>
|
||||
110 </TD><TD> 41 </TD><TD> 01 </TD><TD> 43 </TD><TD> 76 </TD><TD> 01 </TD><TD> 08 </TD><TD> 64 </TD><TD> Esc </TD></TR><TR><TD>
|
||||
112 </TD><TD> 58 </TD><TD> 3b </TD><TD> 24 </TD><TD> 05 </TD><TD> 3b </TD><TD> 07 </TD><TD> 58 </TD><TD> F1 </TD></TR><TR><TD>
|
||||
113 </TD><TD> 59 </TD><TD> 3c </TD><TD> 16 </TD><TD> 06 </TD><TD> 3c </TD><TD> 0f </TD><TD> 59 </TD><TD> F2 </TD></TR><TR><TD>
|
||||
114 </TD><TD> 60 </TD><TD> 3d </TD><TD> 08 </TD><TD> 04 </TD><TD> 3d </TD><TD> 17 </TD><TD> 5a </TD><TD> F3 </TD></TR><TR><TD>
|
||||
115 </TD><TD> 61 </TD><TD> 3e </TD><TD> 09 </TD><TD> 0c </TD><TD> 3e </TD><TD> 1f </TD><TD> 5b </TD><TD> F4 </TD></TR><TR><TD>
|
||||
116 </TD><TD> 62 </TD><TD> 3f </TD><TD> 5f </TD><TD> 03 </TD><TD> 3f </TD><TD> 27 </TD><TD> 5c </TD><TD> F5 </TD></TR><TR><TD>
|
||||
117 </TD><TD> 63 </TD><TD> 40 </TD><TD> 6b </TD><TD> 0b </TD><TD> 40 </TD><TD> 2f </TD><TD> 5d </TD><TD> F6 </TD></TR><TR><TD>
|
||||
118 </TD><TD> 64 </TD><TD> 41 </TD><TD> 33 </TD><TD> 83 </TD><TD> 41 </TD><TD> 37 </TD><TD> 5e </TD><TD> F7 </TD></TR><TR><TD>
|
||||
119 </TD><TD> 65 </TD><TD> 42 </TD><TD> 25 </TD><TD> 0a </TD><TD> 42 </TD><TD> 3f </TD><TD> 5f </TD><TD> F8 </TD></TR><TR><TD>
|
||||
120 </TD><TD> 66 </TD><TD> 43 </TD><TD> 17 </TD><TD> 01 </TD><TD> 43 </TD><TD> 47 </TD><TD> 60 </TD><TD> F9 </TD></TR><TR><TD>
|
||||
121 </TD><TD> 67 </TD><TD> 44 </TD><TD> 18 </TD><TD> 09 </TD><TD> 44 </TD><TD> 4f </TD><TD> 61 </TD><TD> F10 </TD></TR><TR><TD>
|
||||
122 </TD><TD> 68 </TD><TD> 57 </TD><TD> 6e </TD><TD> 78 </TD><TD> 57 </TD><TD> 56 </TD><TD> 62 </TD><TD> F11 </TD></TR><TR><TD>
|
||||
123 </TD><TD> 69 </TD><TD> 58 </TD><TD> 3a </TD><TD> 07 </TD><TD> 58 </TD><TD> 5e </TD><TD> 63 </TD><TD> F12 </TD></TR><TR><TD>
|
||||
124 </TD><TD> 70 </TD><TD> e0-37 </TD><TD> e0-5e </TD><TD> e0-7c </TD><TD> e0-37 </TD><TD> 57 </TD><TD> 6e </TD><TD> PrtScr </TD></TR><TR><TD>
|
||||
0 </TD><TD> 154 </TD><TD> 54 </TD><TD> 1a </TD><TD> 84 </TD><TD> 54 </TD><TD> 57 </TD><TD> 6e </TD><TD> Alt+SysRq </TD></TR><TR><TD>
|
||||
125 </TD><TD> 71 </TD><TD> 46 </TD><TD> 0a </TD><TD> 7e </TD><TD> 46 </TD><TD> 5f </TD><TD> 76 </TD><TD> ScrollLock </TD></TR><TR><TD>
|
||||
126 </TD><TD> 72 </TD><TD> e1-1d-45 </TD><TD> e1-11-0b </TD><TD> e1-14-77 </TD><TD> e1-1d-45 </TD><TD> 62 </TD><TD> 77 </TD><TD> Pause </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> e0-46 </TD><TD> e0-0a </TD><TD> e0-7e </TD><TD> e0-46 </TD><TD> 62 </TD><TD> 77 </TD><TD> Ctrl+Break </TD></TR><TR><TD>
|
||||
0 </TD><TD> 227 </TD><TD> e0-5b </TD><TD> e0-1b </TD><TD> e0-1f </TD><TD> e0-5b </TD><TD> 8b </TD><TD> 8b </TD><TD> LWin (USB: LGUI) </TD></TR><TR><TD>
|
||||
0 </TD><TD> 231 </TD><TD> e0-5c </TD><TD> e0-75 </TD><TD> e0-27 </TD><TD> e0-5c </TD><TD> 8c </TD><TD> 8c </TD><TD> RWin (USB: RGUI) </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> e0-5d </TD><TD> e0-2b </TD><TD> e0-2f </TD><TD> e0-5d </TD><TD> 8d </TD><TD> 8d </TD><TD> Menu </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> e0-5f </TD><TD> e0-76 </TD><TD> e0-3f </TD><TD> e0-5f </TD><TD> 7f </TD><TD> 54 </TD><TD> Sleep </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> e0-5e </TD><TD> e0-63 </TD><TD> e0-37 </TD><TD> e0-5e </TD><TD> 00 </TD><TD> ff </TD><TD> Power </TD></TR><TR><TD>
|
||||
0 </TD><TD> 0 </TD><TD> e0-63 </TD><TD> e0-78 </TD><TD> e0-5e </TD><TD> e0-63 </TD><TD> 00 </TD><TD> ff </TD><TD> Wake </TD></TR><TR><TD>
|
||||
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss9.7">9.7 Vendor extensions</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<A NAME="logiteche2"></A>
|
||||
Logitech uses an <B>e2</B> prefix for the codes sent by a
|
||||
pointing device integrated on the keyboard.
|
||||
<P>
|
||||
<P>
|
||||
<P>
|
||||
<P>
|
||||
<HR>
|
||||
<A HREF="scancodes-10.html">Next</A>
|
||||
<A HREF="scancodes-8.html">Previous</A>
|
||||
<A HREF="scancodes.html#toc9">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
175
specs/kbd/scancodes.html
Normal file
@@ -0,0 +1,175 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
||||
<TITLE>Keyboard scancodes</TITLE>
|
||||
<LINK HREF="scancodes-1.html" REL=next>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<A HREF="scancodes-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
<HR>
|
||||
<H1>Keyboard scancodes</H1>
|
||||
|
||||
<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v1.2e, 2004-05-20
|
||||
<P><HR>
|
||||
<EM>This note contains some information about PC keyboard scancodes.</EM>
|
||||
<HR>
|
||||
<P>
|
||||
<H2><A NAME="toc1">1.</A> <A HREF="scancodes-1.html">Keyboard scancodes</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-1.html#ss1.1">1.1 Key release</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.2">1.2 Protocol scancodes</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.3">1.3 Escape scancodes</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.4">1.4 Ordinary scancodes</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.5">1.5 Escaped scancodes</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.6">1.6 Fake shifts</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.7">1.7 Added non-fake shifts</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.8">1.8 Turbo Mode</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.9">1.9 Power Saving</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.10">1.10 Initializing special keyboards</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.11">1.11 Manipulating extra LEDs</A>
|
||||
<LI><A HREF="scancodes-1.html#ss1.12">1.12 The laptop FN key</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc2">2.</A> <A HREF="scancodes-2.html">Special keyboards - XT keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-2.html#ss2.1">2.1 XT keyboard</A>
|
||||
<LI><A HREF="scancodes-2.html#ss2.2">2.2 Victor keyboard</A>
|
||||
<LI><A HREF="scancodes-2.html#ss2.3">2.3 Olivetti M24 keyboard</A>
|
||||
<LI><A HREF="scancodes-2.html#ss2.4">2.4 Telerate keyboard</A>
|
||||
<LI><A HREF="scancodes-2.html#ss2.5">2.5 NCR keyboard</A>
|
||||
<LI><A HREF="scancodes-2.html#ss2.6">2.6 Cherry G80-0777</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc3">3.</A> <A HREF="scancodes-3.html">Special keyboards - Amstrad/Schneider keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-3.html#ss3.1">3.1 Amstrad/Schneider PC1512</A>
|
||||
<LI><A HREF="scancodes-3.html#ss3.2">3.2 Amstrad/Schneider other models</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc4">4.</A> <A HREF="scancodes-4.html">Special keyboards - AT keyboards</A></H2>
|
||||
|
||||
<P>
|
||||
<H2><A NAME="toc5">5.</A> <A HREF="scancodes-5.html">Special keyboards - MF II keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-5.html#ss5.1">5.1 Compaq keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.2">5.2 IBM keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.3">5.3 Logitech keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.4">5.4 Microsoft keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.5">5.5 Safeway keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.6">5.6 Internet Wireless Keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.7">5.7 Nokia keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.8">5.8 Focus KeyPro FK-9000 keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.9">5.9 BTC keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.10">5.10 LK411 and LK450 keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.11">5.11 An OmniKey keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.12">5.12 GRiD 2260 keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.13">5.13 An old Olivetti keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.14">5.14 Cherry G81-3000</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.15">5.15 Accord keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.16">5.16 Trust Ergonomic keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.17">5.17 Brazilian keyboards</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.18">5.18 RC930 keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.19">5.19 Tandberg Data keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.20">5.20 Host Connected keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.21">5.21 A nameless USB keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.22">5.22 Omnibook keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.23">5.23 EZ Button keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.24">5.24 Chicony KBP-8993 keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.25">5.25 Keyboards for HP Kayak and Vectra</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.26">5.26 A keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.27">5.27 Yahoo! keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.28">5.28 Honeywell Multimedia Keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.29">5.29 Samsung Ergonomics Keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.30">5.30 The "LiteOn MediaTouch Keyboard" type SK-2500</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.31">5.31 The Acer Aspire 1310LC laptop</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.32">5.32 The Emachines eKB-5190(A) keyboard</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.33">5.33 Keyboards with many keys</A>
|
||||
<LI><A HREF="scancodes-5.html#ss5.34">5.34 A keyboard treating PrtSc/SysRq like Pause/Break</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc6">6.</A> <A HREF="scancodes-6.html">NCD keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-6.html#ss6.1">6.1 A Japanese keyboard using e0 as ordinary scancode</A>
|
||||
<LI><A HREF="scancodes-6.html#ss6.2">6.2 The NCD N-123NA keyboard</A>
|
||||
<LI><A HREF="scancodes-6.html#ss6.3">6.3 The NCD N-123UX keyboard</A>
|
||||
<LI><A HREF="scancodes-6.html#ss6.4">6.4 The NCD N-97 keyboard</A>
|
||||
<LI><A HREF="scancodes-6.html#ss6.5">6.5 NCD X terminals</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc7">7.</A> <A HREF="scancodes-7.html">Japanese keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-7.html#ss7.1">7.1 Japanese 86/106 keyboards</A>
|
||||
<LI><A HREF="scancodes-7.html#ss7.2">7.2 Description of the all-Japanese keys</A>
|
||||
<LI><A HREF="scancodes-7.html#ss7.3">7.3 A Japanese keyboard that imitates a US one</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc8">8.</A> <A HREF="scancodes-8.html">Korean keyboards</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-8.html#ss8.1">8.1 An A4tech keyboard</A>
|
||||
<LI><A HREF="scancodes-8.html#ss8.2">8.2 The DEC LK201-K</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc9">9.</A> <A HREF="scancodes-9.html">Keyboard-internal scancodes</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-9.html#ss9.1">9.1 Three scancode sets</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.2">9.2 Make and Break codes</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.3">9.3 Translation</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.4">9.4 Correspondence</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.5">9.5 Use</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.6">9.6 A table</A>
|
||||
<LI><A HREF="scancodes-9.html#ss9.7">9.7 Vendor extensions</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc10">10.</A> <A HREF="scancodes-10.html">The AT keyboard controller</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-10.html#ss10.1">10.1 The keyboard controller status register</A>
|
||||
<LI><A HREF="scancodes-10.html#ss10.2">10.2 The keyboard controller command byte</A>
|
||||
<LI><A HREF="scancodes-10.html#ss10.3">10.3 Keyboard controller commands</A>
|
||||
<LI><A HREF="scancodes-10.html#ss10.4">10.4 The input port P1</A>
|
||||
<LI><A HREF="scancodes-10.html#ss10.5">10.5 The output port P2</A>
|
||||
<LI><A HREF="scancodes-10.html#ss10.6">10.6 The test port T</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc11">11.</A> <A HREF="scancodes-11.html">Keyboard commands</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-11.html#ss11.1">11.1 Keyboard command details</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc12">12.</A> <A HREF="scancodes-12.html">The PS/2 Mouse</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="scancodes-12.html#ss12.1">12.1 Modes</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.2">12.2 Scaling</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.3">12.3 PS/2 mouse protocol</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.4">12.4 Mouse Commands</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.5">12.5 Sliced parameters</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.6">12.6 Synaptics Touchpad</A>
|
||||
<LI><A HREF="scancodes-12.html#ss12.7">12.7 Vendor extensions</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc13">13.</A> <A HREF="scancodes-13.html">USB</A></H2>
|
||||
|
||||
<P>
|
||||
<H2><A NAME="toc14">14.</A> <A HREF="scancodes-14.html">Reporting</A></H2>
|
||||
|
||||
<HR>
|
||||
<A HREF="scancodes-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
</BODY>
|
||||
</HTML>
|
||||
BIN
specs/kbd/sk2500.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
170
specs/kbd/table.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/* Scancode stuff - aeb, 991216 */
|
||||
|
||||
/* translation from keyboard to scancode - the 8042 table */
|
||||
|
||||
unsigned char ttable[256] = {
|
||||
0xff,0x43,0x41,0x3f,0x3d,0x3b,0x3c,0x58,0x64,0x44,0x42,0x40,0x3e,0x0f,0x29,0x59,
|
||||
0x65,0x38,0x2a,0x70,0x1d,0x10,0x02,0x5a,0x66,0x71,0x2c,0x1f,0x1e,0x11,0x03,0x5b,
|
||||
0x67,0x2e,0x2d,0x20,0x12,0x05,0x04,0x5c,0x68,0x39,0x2f,0x21,0x14,0x13,0x06,0x5d,
|
||||
0x69,0x31,0x30,0x23,0x22,0x15,0x07,0x5e,0x6a,0x72,0x32,0x24,0x16,0x08,0x09,0x5f,
|
||||
0x6b,0x33,0x25,0x17,0x18,0x0b,0x0a,0x60,0x6c,0x34,0x35,0x26,0x27,0x19,0x0c,0x61,
|
||||
0x6d,0x73,0x28,0x74,0x1a,0x0d,0x62,0x6e,0x3a,0x36,0x1c,0x1b,0x75,0x2b,0x63,0x76,
|
||||
0x55,0x56,0x77,0x78,0x79,0x7a,0x0e,0x7b,0x7c,0x4f,0x7d,0x4b,0x47,0x7e,0x7f,0x6f,
|
||||
0x52,0x53,0x50,0x4c,0x4d,0x48,0x01,0x45,0x57,0x4e,0x51,0x4a,0x37,0x49,0x46,0x54,
|
||||
0x80,0x81,0x82,0x41,0x54,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
|
||||
0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
|
||||
0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
|
||||
0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
|
||||
0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
|
||||
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
|
||||
};
|
||||
|
||||
/* some entries guessed - see scancodes.sgml */
|
||||
|
||||
|
||||
/* Untranslated scancodes, and USB key values.
|
||||
For translated values, feed through ttable[].
|
||||
|
||||
I also included Vojtech Pavlik's scancodes.h in this directory.
|
||||
It mostly agrees with this table, but lacks
|
||||
Microsoft Internet keys, and misses some set1 values. */
|
||||
|
||||
struct keycode {
|
||||
unsigned int position, usb, set1, set2, set3;
|
||||
char *name; /* keycap on a standard US keyboard */
|
||||
} keycodes[] = {
|
||||
1, 53, 0x29, 0x0e, 0x0e, "`~",
|
||||
2, 30, 0x02, 0x16, 0x16, "1!",
|
||||
3, 31, 0x03, 0x1e, 0x1e, "2@",
|
||||
4, 32, 0x04, 0x26, 0x26, "3#",
|
||||
5, 33, 0x05, 0x25, 0x25, "4$",
|
||||
6, 34, 0x06, 0x2e, 0x2e, "5%E",
|
||||
7, 35, 0x07, 0x36, 0x36, "6^",
|
||||
8, 36, 0x08, 0x3d, 0x3d, "7&",
|
||||
9, 37, 0x09, 0x3e, 0x3e, "8*",
|
||||
10, 38, 0x0a, 0x46, 0x46, "9(",
|
||||
11, 39, 0x0b, 0x45, 0x45, "0)",
|
||||
12, 45, 0x0c, 0x4e, 0x4e, "-_",
|
||||
13, 46, 0x0d, 0x55, 0x55, "=+",
|
||||
15, 42, 0x0e, 0x66, 0x66, "Backspace",
|
||||
|
||||
16, 43, 0x0f, 0x0d, 0x0d, "Tab",
|
||||
17, 20, 0x10, 0x15, 0x15, "Q",
|
||||
18, 26, 0x11, 0x1d, 0x1d, "W",
|
||||
19, 8, 0x12, 0x24, 0x24, "E",
|
||||
20, 21, 0x13, 0x2d, 0x2d, "R",
|
||||
21, 23, 0x14, 0x2c, 0x2c, "T",
|
||||
22, 28, 0x15, 0x35, 0x35, "Y",
|
||||
23, 24, 0x16, 0x3c, 0x3c, "U",
|
||||
24, 12, 0x17, 0x43, 0x43, "I",
|
||||
25, 18, 0x18, 0x44, 0x44, "O",
|
||||
26, 19, 0x19, 0x4d, 0x4d, "P",
|
||||
27, 47, 0x1a, 0x54, 0x54, "[{",
|
||||
28, 48, 0x1b, 0x5b, 0x5b, "]}",
|
||||
29, 49, 0x2b, 0x5d, 0x5c, "\\|",
|
||||
|
||||
30, 57, 0x3a, 0x58, 0x14, "CapsLock",
|
||||
31, 04, 0x1e, 0x1c, 0x1c, "A",
|
||||
32, 22, 0x1f, 0x1b, 0x1b, "S",
|
||||
33, 7, 0x20, 0x23, 0x23, "D",
|
||||
34, 9, 0x21, 0x2b, 0x2b, "F",
|
||||
35, 10, 0x22, 0x34, 0x34, "G",
|
||||
36, 11, 0x23, 0x33, 0x33, "H",
|
||||
37, 13, 0x24, 0x3b, 0x3b, "J",
|
||||
38, 14, 0x25, 0x42, 0x42, "K",
|
||||
39, 15, 0x26, 0x4b, 0x4b, "L",
|
||||
40, 51, 0x27, 0x4c, 0x4c, ";:",
|
||||
41, 52, 0x28, 0x52, 0x52, "'\"",
|
||||
42, 50, 0, 0, 0, "non-US-1",
|
||||
43, 40, 0x1c, 0x5a, 0x5a, "Enter",
|
||||
|
||||
44, 225, 0x2a, 0x12, 0x12, "LShift",
|
||||
46, 29, 0x2c, 0x1a, 0x1a, "Z",
|
||||
47, 27, 0x2d, 0x22, 0x22, "X",
|
||||
48, 6, 0x2e, 0x21, 0x21, "C",
|
||||
49, 25, 0x2f, 0x2a, 0x2a, "V",
|
||||
50, 5, 0x30, 0x32, 0x32, "B",
|
||||
51, 17, 0x31, 0x31, 0x31, "N",
|
||||
52, 16, 0x32, 0x3a, 0x3a, "M",
|
||||
53, 54, 0x33, 0x41, 0x41, ",<",
|
||||
54, 55, 0x34, 0x49, 0x49, ".>",
|
||||
55, 56, 0x35, 0x4a, 0x4a, "/?",
|
||||
57, 229, 0x36, 0x59, 0x59, "RShift",
|
||||
|
||||
58, 224, 0x1d, 0x14, 0x11, "LCtrl",
|
||||
60, 226, 0x38, 0x11, 0x19, "LAlt",
|
||||
61, 44, 0x39, 0x29, 0x29, "space",
|
||||
62, 230, 0xe038, 0xe011, 0x39, "RAlt",
|
||||
64, 228, 0xe01d, 0xe014, 0x58, "RCtrl",
|
||||
|
||||
75, 73, 0xe052, 0xe070, 0x67, "Insert",
|
||||
76, 76, 0xe053, 0xe071, 0x64, "Delete",
|
||||
80, 74, 0xe047, 0xe06c, 0x6e, "Home",
|
||||
81, 77, 0xe04f, 0xe069, 0x65, "End",
|
||||
85, 75, 0xe049, 0xe07d, 0x6f, "PgUp",
|
||||
86, 78, 0xe051, 0xe07a, 0x6d, "PgDn",
|
||||
|
||||
79, 80, 0xe04b, 0xe06b, 0x61, "Left",
|
||||
83, 82, 0xe048, 0xe075, 0x63, "Up",
|
||||
84, 81, 0xe050, 0xe072, 0x60, "Down",
|
||||
89, 79, 0xe04d, 0xe074, 0x6a, "Right",
|
||||
|
||||
90, 83, 0x45, 0x77, 0x76, "NumLock",
|
||||
91, 95, 0x47, 0x6c, 0x6c, "KP-7 / Home",
|
||||
92, 92, 0x4b, 0x6b, 0x6b, "KP-4 / Left",
|
||||
93, 89, 0x4f, 0x69, 0x69, "KP-1 / End",
|
||||
95, 84, 0xe035, 0xe04a, 0x77, "KP-/",
|
||||
96, 96, 0x48, 0x75, 0x75, "KP-8 / Up",
|
||||
97, 93, 0x4c, 0x73, 0x73, "KP-5",
|
||||
98, 90, 0x50, 0x72, 0x72, "KP-2",
|
||||
99, 98, 0x52, 0x70, 0x70, "KP-0 / Ins",
|
||||
100, 85, 0x37, 0x7c, 0x7e, "KP-*",
|
||||
101, 97, 0x49, 0x7d, 0x7d, "KP-9",
|
||||
102, 94, 0x4d, 0x74, 0x74, "KP-6 / Right",
|
||||
103, 91, 0x51, 0x7a, 0x7a, "KP-3 / PgDn",
|
||||
104, 99, 0x53, 0x71, 0x71, "KP-. / Del",
|
||||
105, 86, 0x4a, 0x7b, 0x84, "KP--",
|
||||
106, 87, 0x4e, 0x79, 0x7c, "KP-+",
|
||||
108, 88, 0xe01c, 0xe05a, 0x79, "KP-Enter",
|
||||
|
||||
110, 41, 0x01, 0x76, 0x08, "Esc",
|
||||
112, 58, 0x3b, 0x05, 0x07, "F1",
|
||||
113, 59, 0x3c, 0x06, 0x0f, "F2",
|
||||
114, 60, 0x3d, 0x04, 0x17, "F3",
|
||||
115, 61, 0x3e, 0x0c, 0x1f, "F4",
|
||||
116, 62, 0x3f, 0x03, 0x27, "F5",
|
||||
117, 63, 0x40, 0x0b, 0x2f, "F6",
|
||||
118, 64, 0x41, 0x83, 0x37, "F7", /* Vojtech has 0x02 in set2 */
|
||||
119, 65, 0x42, 0x0a, 0x3f, "F8",
|
||||
120, 66, 0x43, 0x01, 0x47, "F9",
|
||||
121, 67, 0x44, 0x09, 0x4f, "F10",
|
||||
122, 68, 0x57, 0x78, 0x56, "F11",
|
||||
123, 69, 0x58, 0x07, 0x5e, "F12",
|
||||
|
||||
124, 70, 0xe037, 0xe07c, 0x57, "PrtScr",
|
||||
0, 154, 0x54, 0x84, 0x57, "Alt+SysRq",
|
||||
125, 71, 0x46, 0x7e, 0x5f, "ScrollLock",
|
||||
126, 72, 0xe11d45, 0xe11477, 0x62, "Pause",
|
||||
0, 0, 0xe046, 0xe07e, 0x62, "Ctrl+Break",
|
||||
|
||||
/* Microsoft Windows and Internet keys and Power keys */
|
||||
0, 227, 0xe05b, 0xe01f, 0x8b, "LWin (USB: LGUI)",
|
||||
0, 231, 0xe05c, 0xe027, 0x8c, "RWin (USB: RGUI)",
|
||||
0, 0, 0xe05d, 0xe02f, 0x8d, "Menu",
|
||||
|
||||
0, 0, 0xe06a, 0xe038, 0x38, "Back",
|
||||
0, 0, 0xe069, 0xe030, 0x30, "Forward",
|
||||
0, 0, 0xe068, 0xe028, 0x28, "Stop",
|
||||
0, 0, 0xe06c, 0xe048, 0x48, "Mail",
|
||||
0, 0, 0xe065, 0xe010, 0x10, "Search",
|
||||
0, 0, 0xe066, 0xe018, 0x18, "Favorites",
|
||||
0, 0, 0xe032, 0xe03a, 0x97, "Web / Home",
|
||||
|
||||
0, 0, 0xe06b, 0xe040, 0x40, "My Computer",
|
||||
0, 0, 0xe021, 0xe02b, 0x99, "Calculator",
|
||||
0, 0, 0xe05f, 0xe03f, 0x7f, "Sleep",
|
||||
0, 0, 0xe05e, 0xe037, 0, "Power",
|
||||
0, 0, 0xe063, 0xe05e, 0, "Wake",
|
||||
};
|
||||
BIN
specs/kbd/telerate-s.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
specs/kbd/telerate.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
specs/kbd/victor-s.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
specs/kbd/victor.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
specs/kbd/xt-at-switch.jpg
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
specs/kbd/xtkbd-s.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
specs/kbd/xtkbd.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
specs/kbd/yahoo912.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |