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