|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25:
26: /* usb_keymap.c
27: * Copyright Apple Computers, Inc., 1998
28: * Created hastily on 12/2/98 by Adam Wang
29: * This file does a quick map of USB scan codes to ADB scan codes, based on
30: * the Cosmo USB Tables 1.0
31: * I'm not sure what some of the Norsi key conflicts with standard ADB keyboards are.
32: */
33:
34: unsigned char usb_2_adb_keymap[] =
35: {
36: 0x0, // 0
37: 0x0, // 1
38: 0x0, // 2
39: 0x0, // 3
40: 0x0, // 4
41: 0x0b, // 5
42: 0x08, // 6
43: 0x02, // 7
44: 0x0e, // 8
45: 0x03, // 9
46: 0x05, // a
47: 0x04, // b
48: 0x22, // c
49: 0x26, // d
50: 0x28, // e
51: 0x25, // f
52: 0x2e, // 10
53: 0x2d, // 11
54: 0x1f, // 12
55: 0x23, // 13
56: 0x0c, // 14
57: 0x0f, // 15
58: 0x01, // 16
59: 0x11, // 17
60: 0x20, // 18
61: 0x09, // 19
62: 0x0d, // 1a
63: 0x07, // 1b
64: 0x10, // 1c
65: 0x06, // 1d
66: 0x12, // 1e
67: 0x13, // 1f
68: 0x14, // 20
69: 0x15, // 21
70: 0x17, // 22
71: 0x16, // 23
72: 0x1a, // 24
73: 0x1c, // 25
74: 0x19, // 26
75: 0x1d, // 27
76: 0x24, // 28
77: 0x35, // 29
78: 0x33, // 2a
79: 0x30, // 2b
80: 0x31, // 2c
81: 0x1b, // 2d
82: 0x18, // 2e
83: 0x21, // 2f
84: 0x1e, // 30
85: 0x2a, // 31
86: 0x2a, // 32
87: 0x29, // 33
88: 0x27, // 34
89: 0x32, // 35
90: 0x2b, // 36
91: 0x2f, // 37
92: 0x2c, // 38
93: 0x39, // 39
94: 0x7a, // 3a
95: 0x78, // 3b
96: 0x63, // 3c
97: 0x76, // 3d
98: 0x60, // 3e
99: 0x61, // 3f
100: 0x62, // 40
101: 0x64, // 41
102: 0x65, // 42
103: 0x6d, // 43
104: 0x67, // 44
105: 0x6f, // 45
106: 0x69, // 46
107: 0x6b, // 47
108: 0x71, // 48
109: 0x72, // 49
110: 0x73, // 4a
111: 0x74, // 4b
112: 0x75, // 4c
113: 0x77, // 4d
114: 0x79, // 4e
115: 0x3c, // 4f
116: 0x3b, // 50
117: 0x3d, // 51
118: 0x3e, // 52
119: 0x47, // 53
120: 0x4b, // 54
121: 0x43, // 55
122: 0x4e, // 56
123: 0x45, // 57
124: 0x4c, // 58 Not on Cosmo, but is 0x6A for JIS????
125: 0x53, // 59
126: 0x54, // 5a
127: 0x55, // 5b
128: 0x56, // 5c
129: 0x57, // 5d
130: 0x58, // 5e
131: 0x59, // 5f
132: 0x5b, // 60
133: 0x5c, // 61
134: 0x52, // 62
135: 0x41, // 63
136: 0x0a, // 64 ISO only
137: 0x6e, // 65 Microsoft Winodows95 key
138: 0x7f, // 66 This is the power key, scan code in ADB is 7f 7f, not 7f ff
139: 0x51, // 67
140: 0x0, // 68
141: 0x0, // 69
142: 0x0, // 6a
143: 0x0, // 6b
144: 0x0, // 6c
145: 0x0, // 6d
146: 0x0, // 6e
147: 0x0, // 6f
148: 0x0, // 70
149: 0x0, // 71
150: 0x0, // 72
151: 0x0, // 73
152: 0x0, // 74
153: 0x0, // 75
154: 0x0, // 76
155: 0x0, // 77
156: 0x0, // 78
157: 0x0, // 79
158: 0x0, // 7a
159: 0x0, // 7b
160: 0x0, // 7c
161: 0x0, // 7d
162: 0x0, // 7e
163: 0x01, // 7f Norsi Mute, or maybe 0x4a
164: 0x03, // 80 Norsi volume up, otherwise is 0x48 in ADB
165: 0x02, // 81 Norsi volume down
166: 0x0, // 82
167: 0x0, // 83
168: 0x0, // 84
169: 0x5f, // 85 , JIS only
170: 0x0, // 86
171: 0x5e, // 87 Ro (JIS)
172: 0x0, // 88
173: 0x5d, // 89 Yen (JIS)
174: 0x0, // 8a
175: 0x0, // 8b
176: 0x0, // 8c
177: 0x0, // 8d
178: 0x0, // 8e
179: 0x0, // 8f
180: 0x68, // 90 Kana
181: 0x66, // 91 Eisu
182: 0x0, // 92
183: 0x0, // 93
184: 0x0, // 94
185: 0x0, // 95
186: 0x0, // 96
187: 0x0, // 97
188: 0x0, // 98
189: 0x0, // 99
190: 0x0, // 9a
191: 0x0, // 9b
192: 0x0, // 9c
193: 0x0, // 9d
194: 0x0, // 9e
195: 0x0, // 9f
196: 0x0, // a0
197: 0x0, // a1
198: 0x0, // a2
199: 0x0, // a3
200: 0x0, // a4
201: 0x0, // a5
202: 0x0, // a6
203: 0x0, // a7
204: 0x0, // a8
205: 0x0, // a9
206: 0x0, // aa
207: 0x0, // ab
208: 0x0, // ac
209: 0x0, // ad
210: 0x0, // ae
211: 0x0, // af
212: 0x0, // b0
213: 0x0, // b1
214: 0x0, // b2
215: 0x0, // b3
216: 0x0, // b4
217: 0x0, // b5
218: 0x0, // b6
219: 0x0, // b7
220: 0x0, // b8
221: 0x0, // b9
222: 0x0, // ba
223: 0x0, // bb
224: 0x0, // bc
225: 0x0, // bd
226: 0x0, // be
227: 0x0, // bf
228: 0x0, // c0
229: 0x0, // c1
230: 0x0, // c2
231: 0x0, // c3
232: 0x0, // c4
233: 0x0, // c5
234: 0x0, // c6
235: 0x0, // c7
236: 0x0, // c8
237: 0x0, // c9
238: 0x0, // ca
239: 0x0, // cb
240: 0x0, // cc
241: 0x0, // cd
242: 0x0, // ce
243: 0x0, // cf
244: 0x0, // d0
245: 0x0, // d1
246: 0x0, // d2
247: 0x0, // d3
248: 0x0, // d4
249: 0x0, // d5
250: 0x0, // d6
251: 0x0, // d7
252: 0x0, // d8
253: 0x0, // d9
254: 0x0, // da
255: 0x0, // db
256: 0x0, // dc
257: 0x0, // dd
258: 0x0, // de
259: 0x0, // df
260: 0x36, // e0
261: 0x38, // e1 Left Shift
262: 0x3a, // e2
263: 0x37, // e3
264: 0x7d, // e4 Right Control, not on iMac Cosmo
265: 0x7b, // e5 Right Shift
266: 0x7c, // e6 Right Option JIS only
267: 0x37, // e7 Right Command ABD is 7e, but ADBK_FLOWER is fixed for 0x37
268: 0x0, // e8
269: 0x0, // e9
270: 0x0, // ea
271: 0x0, // eb
272: 0x0, // ec
273: 0x0, // ed
274: 0x0, // ee
275: 0x0, // ef
276: 0x0, // f0
277: 0x0, // f1
278: 0x0, // f2
279: 0x0, // f3
280: 0x0, // f4
281: 0x0, // f5
282: 0x0, // f6
283: 0x0, // f7
284: 0x0, // f8
285: 0x0, // f9
286: 0x0, // fa
287: 0x0, // fb
288: 0x0, // fc
289: 0x0, // fd
290: 0x0, // fe
291: 0x0, // ff
292: 0 //Final one
293: };
294:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.