Fix inconstiency in recent_cpu update description.
[pintos.git] / specs / kbd / scancodes-9.html
blob44451c64eaae78d83126ab46cb469fc94a1bd662
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5 <TITLE>Keyboard scancodes: Keyboard-internal scancodes</TITLE>
6 <LINK HREF="scancodes-10.html" REL=next>
7 <LINK HREF="scancodes-8.html" REL=previous>
8 <LINK HREF="scancodes.html#toc9" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="scancodes-10.html">Next</A>
12 <A HREF="scancodes-8.html">Previous</A>
13 <A HREF="scancodes.html#toc9">Contents</A>
14 <HR>
15 <H2><A NAME="scancodesets"></A> <A NAME="s9">9. Keyboard-internal scancodes</A></H2>
17 <P>
18 <H2><A NAME="ss9.1">9.1 Three scancode sets</A>
19 </H2>
21 <P>The usual PC keyboards are capable of producing three sets of scancodes.
22 Writing 0xf0 followed by 1, 2 or 3 to port 0x60 will put the keyboard
23 in scancode mode 1, 2 or 3. Writing 0xf0 followed by 0 queries the mode,
24 resulting in a scancode byte <B>43</B>, <B>41</B> or <B>3f</B>
25 from the keyboard.
26 <P>Set 1 contains the values that the XT keyboard (with only one set
27 of scancodes) produced, with extensions for new keys. Someone
28 decided that another numbering was more logical and invented
29 scancode Set 2. However, it was realized that new scancodes
30 would break old programs, so the keyboard output was fed to a
31 8042 microprocessor on the motherboard that could translate Set 2
32 back into Set 1. Indeed a smart construction. This is the default today.
33 Finally there is the PS/2 version, Set 3, more regular, but used by
34 almost nobody.
35 <P>(I wrote this long ago. Nowadays Linux 2.5 may try to use Set 3.
36 Also certain HP machines, like the PS/2 version of the HP9000
37 workstation, have used Set 3.)
38 <P>Sets 2 and 3 are designed to be translated by the 8042.
39 Set 1 should not be translated.
40 <P>Not all keyboards support all scancode sets. For example, my MyCom
41 laptop only supports scancode Set 2, and its keyboard does not react
42 at all when in mode 1 or 3.
43 <P>
44 <H2><A NAME="ss9.2">9.2 Make and Break codes</A>
45 </H2>
47 <P>The key press / key release is coded as follows:
48 <P>For Set 1, if the make code of a key is <I>c</I>, the break code
49 will be <I>c</I>+0x80. If the make code is <B>e0</B> <I>c</I>,
50 the break code will be <B>e0</B> <I>c</I>+0x80.
51 The Pause key has make code <B>e1</B> <B>1d</B> <B>45</B>
52 <B>e1</B> <B>9d</B> <B>c5</B> and does not generate a break code.
53 <P>For Set 2, if the make code of a key is <I>c</I>, the break code
54 will be <B>f0</B> <I>c</I>. If the make code is <B>e0</B> <I>c</I>,
55 the break code will be <B>e0</B> <B>f0</B> <I>c</I>.
56 The Pause key has the 8-byte make code <B>e1</B> <B>14</B> <B>77</B>
57 <B>e1</B> <B>f0</B> <B>14</B> <B>f0</B> <B>77</B>.
58 <P>For Set 3, by default most keys do not generate a break code - only CapsLock,
59 LShift, RShift, LCtrl and LAlt do. However, by default all non-traditional
60 keys do generate a break code - thus, LWin, RWin, Menu do, and for example
61 on the Microsoft Internet keyboard, so do Back, Forward, Stop,
62 Mail, Search, Favorites, Web/Home, MyComputer, Calculator, Sleep.
63 On my BTC keyboard, also the Macro key does.
64 <P>In Scancode Mode 3 it is possible to enable or disable key repeat
65 and the production of break codes either on a key-by-key basis
66 or for all keys at once.
67 And just like for Set 2, key release is indicated by a <B>f0</B> prefix
68 in those cases where it is indicated.
69 There is nothing special with the Pause key in scancode mode 3.
70 <P>
71 <H2><A NAME="ss9.3">9.3 Translation</A>
72 </H2>
74 <P>The 8042 microprocessor translates the incoming byte stream produced
75 by the keyboard, and turns an <B>f0</B> prefix into an OR with
76 <B>80</B> for the next byte.
77 <A NAME="contagious"></A>
78 (Some implementations do this for the next byte that does not have
79 this bit set already. A consequence is that in Set 3 the keys with Set-3
80 value 0x80 or more are broken in a peculiar way: hitting such a key and
81 then some other key turns the make code for this last key into a break code.
82 For example the Sleep key on a Microsoft Internet keyboard generates
83 <B>54</B> / <B>d4</B> for press/release. But pressing and
84 releasing first Menu and then Sleep produces
85 <B>8d</B> <B>8d</B> <B>d4</B> <B>d4</B> as translation of
86 <B>8d</B> <B>f0</B> <B>8d</B> <B>54</B> <B>f0</B> <B>54</B>.
87 Other implementations are OK.)
88 <P>
89 <A NAME="translationtable"></A>
90 Unless told not to translate, the keyboard controller translates
91 keyboard scancodes into the scancodes it returns to the CPU
92 using the following table (in hex):
93 <P>
94 <P>
95 <CENTER><TABLE BORDER><TR><TD>
96 </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>
97 </TD></TR><TR><TD>
98 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>
99 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>
100 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>
101 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>
102 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>
103 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>
104 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>
105 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>
106 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>
107 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>
108 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>
109 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>
110 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>
111 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>
112 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>
113 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>
115 </TD></TR></TABLE></CENTER>
116 <P>A reference for the first half of this table is the book by Gary J Konzak
117 <I>PC 8042 Controller</I>, ISBN 0-929392-21-3.
118 (Report by <CODE>vojtech@suse.cz</CODE>.)
119 <P>A way to check this table is: (i) put the keyboard in untranslated modes
120 1, 2, 3 and look at the
121 <A HREF="table.h">resulting values</A>,
122 and (ii) put the keyboard in translated scancode modes 1, 2, 3. Now compare
123 the values. The entries with question marks were not checked in this way.
124 <P>Note that the range <B>01</B>-<B>7f</B> of this table is 1-1.
125 In the second half of the table, translated and untranslated values
126 are equal in all known cases, with the two exceptions <B>83</B> and <B>84</B>.
127 <P>One asks the controller to transmit untranslated scancodes by writing
128 a keyboard controller command with bit 5 set and bit 6 cleared.
129 E.g., use the command byte <B>45</B> to get translated codes,
130 and <B>24</B> to get untranslated codes that do not cause interrupts.
132 <H3>Effects of translation</H3>
135 <H3>Origin of strange scan code set values</H3>
137 <P>The keyboard command <B>f0</B> with argument 1, 2 or 3
138 sets the current scancode set, and this same command
139 with argument 0 asks for the current scancode set.
140 The reply is <B>43</B>, <B>41</B> or <B>3f</B>
141 for sets 1, 2, 3. Why? Because in reality the reply is 1, 2 or 3,
142 and that is what one sees when translation is off. But translation
143 turns these into <B>43</B>, <B>41</B>, <B>3f</B>.
145 <H3><A NAME="keyboardid"></A> Keyboard IDs</H3>
147 <P>Keyboards do report an ID as a reply to the command
149 <A HREF="scancodes-11.html#kcf2">f2</A></B>.
150 (An XT keyboard does not reply, an AT keyboard only replies with an ACK.)
151 An MF2 AT keyboard reports ID <B>ab</B> <B>83</B>.
152 Translation turns this into <B>ab</B> <B>41</B>.
153 <P>Many short keyboards, like IBM ThinkPads, and Spacesaver keyboards,
154 send <B>ab</B> <B>84</B> untranslated,
155 which becomes <B>ab</B> <B>54</B> translated.
156 (The netbsd source has a misunderstanding here, and seems to associate
157 the <B>54</B> and <B>84</B> to the ThinkPad model - cf. the defines
158 KEYB_R_MF2ID2TP75X, KEYB_R_MF2ID2TP76X.)
159 <P>Several 122-key keyboards are reported to send <B>ab</B> <B>86</B>.
160 Here translated and untranslated values coincide.
161 (Reports mention "122-Key Enhanced Keyboard", "standard 122-key keyboard",
162 "122 Key Mainframe Interactive (MFI) Keyboard".)
163 <P>David Monro reports <B>ab</B> <B>85</B> for a
164 <A HREF="scancodes-6.html#NCD97">NCD N-97</A> keyboard.
165 Tim Clarke reports <B>ab</B> <B>85</B> for the
166 "122-Key Host Connect(ed) Keyboard".
167 <P>He also reports
168 <I>Also, when playing with my KVM problems Belkin gave me a
169 105-key Windows keyboard which Id.s itself as 18ABh</I>.
170 <P>Linux 2.5.25 kernel source has 0xaca1 for a
171 "NCD Sun layout keyboard". It also mentions 0xab02 and 0xab7f,
172 but these arise as (mistaken) back translations from
173 <B>ab</B> <B>41</B> and <B>ab</B> <B>54</B>.
174 <P>Ralph Brown's Interrupt list mentions "old Japanese 'G', 'P', 'A' keyboards",
175 with keyboard IDs <B>ab</B> <B>90</B>, <B>ab</B> <B>91</B>,
176 <B>ab</B> <B>92</B>. Here translated and untranslated versions
177 coincide. ID <B>ab</B> <B>90</B> was also mentioned
178 <A HREF="scancodes-7.html#bradford">above</A>.
181 <H2><A NAME="ss9.4">9.4 Correspondence</A>
182 </H2>
184 <P>For the traditional keys the correspondence is fairly clear:
185 above we saw the
186 <A HREF="#translationtable">translation table</A>,
187 and Set 1 equals translated Set 2, and Set 3 equals Set 2 in most cases
188 where Set 2 has a single (non-escaped) scancode,
189 and in any case the correspondence is constant (and given
190 <A HREF="#correspondence">below</A>).
191 <P>On the other hand, modern keyboards have all kinds of multimedia
192 and other additional keys, and what happens for them is completely
193 random, and varies from keyboard to keyboard.
194 <P>Let us look at an example.
195 <P>The
196 <A HREF="scancodes-5.html#msinternet">Microsoft Internet keyboard</A>
197 has keys Search, Favorites, Stop, Forward, Back, My Computer,
198 Mail, Web / Home, Calculator with translated Set 3 scancodes
199 <B>65</B>, <B>66</B>, <B>68</B>, <B>69</B>, <B>6a</B>,
200 <B>6b</B>, <B>6c</B>, <B>97</B>, <B>99</B>, respectively,
201 and translated Set 2 scancodes <B>e0</B> <I>xx</I>, with
202 <I>xx</I> = <B>65</B>, <B>66</B>, <B>68</B>, <B>69</B>,
203 <B>6a</B>, <B>6b</B>, <B>6c</B>, <B>32</B>, <B>21</B>.
204 <P>On the other hand, the
205 <A HREF="scancodes-5.html#ibmrapidaccessii">IBM Rapid Access II keyboard</A>
206 has keys CD stop, CD play, Volume D, Volume U, CD back, CD fwd
207 with translated Set 3 scancodes
208 <B>69</B>, <B>6a</B>, <B>6b</B>, <B>6c</B>, <B>6d</B>, <B>44</B>,
209 and translated Set 2 scancodes <B>e0</B> <I>xx</I>, with
210 <I>xx</I> = <B>20</B>, <B>22</B>, <B>21</B>, <B>23</B>,
211 <B>24</B>, <B>12</B>.
212 <P>Thus, different keyboards have different mappings between Set 2
213 and Set 3 codes.
215 <H2><A NAME="ss9.5">9.5 Use</A>
216 </H2>
218 <P>Can these other scancode sets be used? Probably not.
219 <P>() Translated scancode Set 1 has weird codes that nobody wants to use.
220 <P>(i) My MyCom laptop does not support scancode sets 1 and 3 at all.
221 <P>(ii) Some laptops have special key combinations that bring one
222 into a setup or configuration utility. It is impossible to do
223 anything useful, or to get out of it again, when the scancode mode
224 is not translated Set 2.
225 <P>(iii) Many keyboards have bugs in scancode sets 1 and/or 3 but
226 are fine in scancode Set 2.
227 Vojtech Pavlik reports that his BTC keyboard has the same codes
228 for the '1' and '2' keys in Set3, both having the code for '1').
229 On my BTC keyboard the key up value for Esc and 1 are both <B>ff</B>
230 in scancode Set 1. My Safeway keyboard has untranslated Set 1 equal
231 to translated Set 2, except for the multimedia keys, where
232 untranslated Set 1 equals untranslated Set 2.
233 <P>(iv) A big advantage of Set 3 is that each key generates a unique code
234 so that one does not need to parse sequences. However, the BTC keyboard
235 mentioned
236 <A HREF="scancodes-5.html#BTC">above</A> generates <B>e0</B> <B>6f</B>
237 for its Macro key also in scancode mode 3. The Safeway keyboard mentioned
238 <A HREF="scancodes-5.html#safeway23">above</A> does not generate any codes
239 for its multimedia keys in scancode mode 3.
240 <P>(v) Some keyboard controllers cannot handle Set 3 values that are
241 larger than 0x7f, and give
242 <A HREF="#contagious">peculiar results</A>
243 for e.g. the Windows keys in translated scancode mode 3.
244 The result is that the following key is "eaten": the key down action
245 turns into a key up.
246 <P>(vi) The USB legacy support only supports translated Set 2.
247 <P>(vii) The
248 <A HREF="http://www.microsoft.com/hwdev/download/desinit/scancode.zip">Microsoft Keyboard Scan Code Specification</A> writes:
249 <I>In the very early days of Windows NT, an attempt was made
250 to use the much more orthogonal Scan Code Set 3, but due to bugs
251 in the implementation of this Scan Code Set on numerous OEM
252 keyboards, the idea was abandoned.</I>
253 And also: <I>Scan Code Set 3 is not used or required for operation
254 of Microsoft operating systems.</I>
255 <P>(viii) Others also tried Set 3. The PS/2 version of the HP9000
256 workstation uses it. This is fine with HP's keyboards but causes
257 some problems with foreign keyboards.
258 <P>(ix) It is said that Hal Snyder of Mark Williams, Co remarked:
259 "We find that about 10% of cheap no-name keyboards do not work
260 in scan code set 3".
261 <P>(x) These days Linux probes the keyboard, and may try to enable Set 3.
262 This is good for learning a lot about strange keyboards.
263 It is bad for having a stable system that just works.
265 <H2><A NAME="correspondence"></A> <A NAME="ss9.6">9.6 A table</A>
266 </H2>
268 <P>(USB codes in decimal, scancodes in hex.)
271 <CENTER><TABLE BORDER><TR><TD>
272 # </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>
273 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>
274 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>
275 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>
276 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>
277 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>
278 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>
279 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>
280 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 &amp; </TD></TR><TR><TD>
281 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>
282 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>
283 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>
284 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>
285 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>
286 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>
287 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>
288 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>
289 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>
290 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>
291 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>
292 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>
293 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>
294 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>
295 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>
296 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>
297 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>
298 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>
299 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>
300 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>
301 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>
302 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>
303 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>
304 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>
305 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>
306 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>
307 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>
308 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>
309 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>
310 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>
311 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>
312 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>
313 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>
314 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>
315 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>
316 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>
317 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>
318 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>
319 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>
320 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>
321 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>
322 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>
323 53 </TD><TD> 54 </TD><TD> 33 </TD><TD> 23 </TD><TD> 41 </TD><TD> 33 </TD><TD> 41 </TD><TD> 33 </TD><TD> , &lt; </TD></TR><TR><TD>
324 54 </TD><TD> 55 </TD><TD> 34 </TD><TD> 22 </TD><TD> 49 </TD><TD> 34 </TD><TD> 49 </TD><TD> 34 </TD><TD> . &gt; </TD></TR><TR><TD>
325 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>
326 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>
327 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>
328 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>
329 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>
330 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>
331 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>
332 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>
333 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>
334 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>
335 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>
336 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>
337 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>
338 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>
339 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>
340 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>
341 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>
342 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>
343 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>
344 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>
345 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>
346 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>
347 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>
348 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>
349 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>
350 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>
351 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>
352 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>
353 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>
354 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>
355 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>
356 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>
357 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>
358 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>
359 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>
360 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>
361 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>
362 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>
363 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>
364 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>
365 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>
366 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>
367 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>
368 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>
369 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>
370 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>
371 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>
372 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>
373 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>
374 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>
375 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>
376 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>
377 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>
378 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>
379 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>
380 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>
381 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>
382 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>
384 </TD></TR></TABLE></CENTER>
387 <H2><A NAME="ss9.7">9.7 Vendor extensions</A>
388 </H2>
391 <A NAME="logiteche2"></A>
392 Logitech uses an <B>e2</B> prefix for the codes sent by a
393 pointing device integrated on the keyboard.
398 <HR>
399 <A HREF="scancodes-10.html">Next</A>
400 <A HREF="scancodes-8.html">Previous</A>
401 <A HREF="scancodes.html#toc9">Contents</A>
402 </BODY>
403 </HTML>