macintosh revision 1.1.1.1 1 // $XFree86: xc/programs/xkbcomp/geometry/macintosh,v 1.3 2003/08/09 14:30:47 pascal Exp $
2 //
3 // Some modifications (<eqdar (a] castalie.org>) :
4 // - Added a <LSGT> key
5 // - Fixed the shape of the <RTRN> key
6 // - Moved <BKSL> to the 'AC' row
7 // - Added a special Macintosh sysctl key
8 // - Minor changes (Function keys shape, LED position...)
9
10 // Minor changes
11 // - Mail address above is no longer valid
12 // - Changed {L,R}MTA to {L,R}WIN, which are defined
13 // 2005/10 -- Simon Vallet <svallet (a] gmail.com>
14
15 default xkb_geometry "macintosh" {
16
17 description= "Apple Extended Keyboard II";
18 width = 475;
19 height = 194;
20
21 shape.cornerRadius= 1;
22 shape "NORM" { { [ 18,18] }, { [2,1], [ 16,17] } };
23 shape "TLDE" { { [ 23,18] }, { [2,1], [ 21,17] } };
24 shape "BKSP" { { [ 33,18] }, { [2,1], [ 31,17] } };
25 shape "TAB" { { [ 33,18] }, { [2,1], [ 31,17] } };
26 shape "RTRN" {
27 { [0,0],[23,0],[23,37],[4,37],[4,18],[0,18] },
28 { [2,1],[21,1],[21,36],[6,36],[6,17],[2,17] } };
29 shape "CAPS" { { [ 37,18] }, { [2,1], [ 35,17] } };
30 shape "LCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
31 shape "LALT" { { [ 22,18] }, { [2,1], [ 20,17] } };
32 shape "LMTA" { { [ 28,18] }, { [2,1], [ 26,17] } };
33 shape "LFSH" { { [ 28,18] }, { [2,1], [ 26,17] } };
34 shape "RCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
35 shape "RALT" { { [ 22,18] }, { [2,1], [ 20,17] } };
36 shape "RMTA" { { [ 28,18] }, { [2,1], [ 26,17] } };
37 shape "RTSH" { { [ 47,18] }, { [2,1], [ 45,17] } };
38 shape "SPCE" { { [123,18] }, { [2,1], [121,17] } };
39 shape "KP0" { { [ 37,18] }, { [2,1], [ 35,17] } };
40 shape "KPEN" { { [ 18,37] }, { [2,1], [ 16,36] } };
41 // Macintosh keyboards have a special sysctl key at the top right
42 shape "AAPL" {
43 { [ 0,0], [ 18,0], [ 18,18], [ 0,18] },
44 { [ 1,1], [ 17,1], [ 17,17], [ 1,17] },
45 { [ 8,5], [ 8,12], [ 2,9] } };
46
47 shape "LEDS" { cornerRadius = 0, { [ 55,19] } };
48 shape "LED" { cornerRadius = 0, { [ 8, 2] } };
49
50 solid "LedPanel" {
51 shape= "LEDS";
52 top = 48;
53 left = 378;
54 };
55
56 indicator.onColor= "green";
57 indicator.offColor= "green30";
58 indicator.top = 50;
59 indicator.shape= "LED";
60 indicator "NumLock" { left = 381; };
61 indicator "CapsLock" { left = 398; };
62 indicator "ScrollLock" { left = 415; };
63 text.top= 55;
64 text.color= "black";
65 text "NumLockLabel" { left = 381; text = "Num\nLock"; };
66 text "CapsLockLabel" { left = 398; text = "Caps\nLock"; };
67 text "ScrollLockLabel" { left = 415; text = "Scroll\nLock"; };
68
69 section.left= 19;
70 row.left= 1;
71 key.shape= "NORM";
72 key.gap= 1;
73
74 section "Function" {
75 top = 48;
76 row {
77 top= 1;
78 keys { <ESC>,
79 { <FK01>, 20 }, <FK02>, <FK03>, <FK04>,
80 { <FK05>, 11 }, <FK06>, <FK07>, <FK08>,
81 { <FK09>, 11 }, <FK10>, <FK11>, <FK12>,
82 { <PRSC>, 10 }, <SCLK>, <PAUS>,
83 // This is the sysctl key on macintosh keyboards
84 // keycode is 222 with a 4.21 kernel, which is <I5E>
85 { <I5E>, "AAPL", 67 }
86 };
87 };
88 }; // End of "Function" section
89
90 section "Alpha" {
91 top = 87;
92 row {
93 top= 1;
94 keys { { <TLDE>, "TLDE" }, <AE01>, <AE02>, <AE03>,
95 <AE04>, <AE05>, <AE06>, <AE07>, <AE08>, <AE09>,
96 <AE10>, <AE11>, <AE12>, { <BKSP>, "BKSP" }
97 };
98 };
99 row {
100 top= 20;
101 keys { { <TAB>, "TAB" }, <AD01>, <AD02>, <AD03>,
102 <AD04>, <AD05>, <AD06>, <AD07>, <AD08>, <AD09>,
103 <AD10>, <AD11>, <AD12>, { <RTRN>, "RTRN" }
104 };
105 };
106 row {
107 top= 39;
108 keys { { <CAPS>, "CAPS" }, <AC01>, <AC02>, <AC03>,
109 <AC04>, <AC05>, <AC06>, <AC07>, <AC08>, <AC09>,
110 <AC10>, <AC11>, <BKSL>
111 };
112 };
113 row {
114 top= 58;
115 keys { { <LFSH>, "LFSH" }, <LSGT>, <AB01>, <AB02>,
116 <AB03>, <AB04>, <AB05>, <AB06>, <AB07>, <AB08>,
117 <AB09>, <AB10>, { <RTSH>, "RTSH" }
118 };
119 };
120 row {
121 top= 77;
122 keys { { <LCTL>, "LCTL" }, { <LALT>, "LALT" },
123 { <LWIN>, "LMTA" },
124 { <SPCE>, "SPCE" },
125 { <RWIN>, "RMTA" },
126 { <RALT>, "RALT" }, { <RCTL>, "RCTL" }
127 };
128 };
129 }; // End of "Alpha" section
130
131 section "Editing" {
132 top = 87;
133 left = 314;
134 row {
135 top= 1;
136 keys { <INS>, <HOME>, <PGUP> };
137 };
138 row {
139 top= 20;
140 keys { <DELE>, <END>, <PGDN> };
141 };
142 row {
143 top= 58;
144 left= 20;
145 keys { <UP> };
146 };
147 row {
148 top= 77;
149 keys { <LEFT>, <DOWN>, <RGHT> };
150 };
151 }; // End of "Editing" section
152
153 // Begin of "Keypad" section
154 section "Keypad" {
155 top = 87;
156 left = 380;
157 row {
158 top= 1;
159 keys { <NMLK>, <KPEQ>, <KPDV>, <KPMU> };
160 };
161 row {
162 top= 20;
163 keys { <KP7>, <KP8>, <KP9>, <KPSU> };
164 };
165 row {
166 top= 39;
167 keys { <KP4>, <KP5>, <KP6>, <KPAD> };
168 };
169 row {
170 top= 58;
171 keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPEN" } };
172 };
173 row {
174 top= 77;
175 keys { { <KP0>, "KP0" }, <KPDL> };
176 };
177 }; // End of "Keypad" section
178
179 }; // End of "default" geometry
180
181
182 // This section describes the geometry of the "Apple Pro" keyboard
183 // included with NewWorld desktop machines
184 //
185 // It adds four new keysyms, labeled SDDN, SDUP, SDNO, EJCT.
186 //
187 // 2005/10 -- Simon Vallet <svallet (a] gmail.com>
188
189 xkb_geometry "applepro" {
190
191 description= "Apple Pro Keyboard";
192 width = 455;
193 height = 150;
194
195 shape.cornerRadius= 1;
196 shape "NORM" { { [ 18, 18] }, { [2, 1], [ 16, 15] } };
197 shape "FUNC" { { [ 18, 21] }, { [2, 1], [ 16, 16] } };
198 shape "BKSP" { { [ 38, 18] }, { [2, 1], [ 36, 15] } };
199 shape "TAB" { { [ 29, 18] }, { [2, 1], [ 26, 15] } };
200 shape "LFSH" { { [ 28, 18] }, { [2, 1], [ 26, 15] } };
201 shape "RTSH" { { [ 47, 18] }, { [2, 1], [ 45, 15] } };
202
203 shape "RTRN" {
204 { [0,0],[27,0],[27,37],[4,37],[4,18],[0,18] },
205 { [2,1],[25,1],[25,34],[6,34],[6,15],[2,15] } };
206
207 shape "CAPS" { { [ 32, 18] }, { [2, 1], [ 26, 15] } };
208 shape "LCTL" { { [ 28, 20] }, { [2, 1], [ 26, 17] } };
209 shape "RCTL" { { [ 28, 20] }, { [2, 1], [ 26, 17] } };
210 shape "LALT" { { [ 23, 20] }, { [2, 1], [ 21, 17] } };
211 shape "RALT" { { [ 23, 20] }, { [2, 1], [ 21, 17] } };
212 shape "LMTA" { { [ 28, 20] }, { [2, 1], [ 26, 17] } };
213 shape "RMTA" { { [ 28, 20] }, { [2, 1], [ 26, 17] } };
214 shape "SPCE" { { [121, 20] }, { [3, 1], [118, 17] } };
215 shape "BOTM" { { [ 18, 20] }, { [2, 1], [ 16, 17] } };
216
217 shape "KP0" { { [ 37, 20] }, { [2, 1], [ 35, 17] } };
218 shape "KPEN" { { [ 18, 39] }, { [2, 1], [ 16, 36] } };
219
220 section.left = 7;
221 row.left = 1;
222 key.gap = 1;
223 key.shape = "NORM";
224
225 section "Function" {
226 key.shape = "FUNC";
227 top = 26;
228 row {
229 top= 1;
230 keys { <ESC>,
231 { <FK01>, 14 }, <FK02>, <FK03>, <FK04>,
232 { <FK05>, 14 }, <FK06>, <FK07>, <FK08>,
233 { <FK09>, 14 }, <FK10>, <FK11>, <FK12>,
234 { <PRSC>, 11 }, <SCLK>, <PAUS>,
235 { <SDDN>, 11 }, <SDUP>, <SDNO>, <EJCT>
236 };
237 };
238 }; // End of "Function" section
239
240
241 section "Alpha" {
242 top = 48;
243 row {
244 top= 1;
245 keys { <TLDE>, <AE01>, <AE02>, <AE03>,
246 <AE04>, <AE05>, <AE06>, <AE07>, <AE08>, <AE09>,
247 <AE10>, <AE11>, <AE12>, { <BKSP>, "BKSP" }
248 };
249 };
250 row {
251 top= 20;
252 keys { { <TAB>, "TAB" }, <AD01>, <AD02>, <AD03>,
253 <AD04>, <AD05>, <AD06>, <AD07>, <AD08>, <AD09>,
254 <AD10>, <AD11>, <AD12>, { <RTRN>, "RTRN" }
255 };
256 };
257 row {
258 top= 39;
259 keys { { <CAPS>, "CAPS" }, <AC01>, <AC02>, <AC03>,
260 <AC04>, <AC05>, <AC06>, <AC07>, <AC08>, <AC09>,
261 <AC10>, <AC11>, <BKSL>
262 };
263 };
264 row {
265 top= 58;
266 keys { { <LFSH>, "LFSH" }, <LSGT>, <AB01>, <AB02>,
267 <AB03>, <AB04>, <AB05>, <AB06>, <AB07>, <AB08>,
268 <AB09>, <AB10>, { <RTSH>, "RTSH" }
269 };
270 };
271 row {
272 top= 77;
273 keys { { <LCTL>, "LCTL" }, { <LALT>, "LALT" },
274 { <LWIN>, "LMTA" },
275 { <SPCE>, "SPCE" },
276 { <RWIN>, "RMTA" },
277 { <RALT>, "RALT" }, { <RCTL>, "RCTL" }
278 };
279 };
280 }; // End of "Alpha" section
281
282 section "Editing" {
283 top = 48;
284 left = 303;
285 row {
286 top= 1;
287 keys { <INS>, <HOME>, <PGUP> };
288 };
289 row {
290 top= 20;
291 keys { <DELE>, <END>, <PGDN> };
292 };
293 row {
294 top= 58;
295 left= 20;
296 keys { <UP> };
297 };
298 row {
299 top= 77;
300 key.shape = "BOTM";
301 keys { <LEFT>, <DOWN>, <RGHT> };
302 };
303 }; // End of "Editing" section
304
305 // Begin of "Keypad" section
306 section "Keypad" {
307 top = 48;
308 left = 370;
309 row {
310 top= 1;
311 keys { <NMLK>, <KPEQ>, <KPDV>, <KPMU> };
312 };
313 row {
314 top= 20;
315 keys { <KP7>, <KP8>, <KP9>, <KPSU> };
316 };
317 row {
318 top= 39;
319 keys { <KP4>, <KP5>, <KP6>, <KPAD> };
320 };
321 row {
322 top= 58;
323 keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPEN" } };
324 };
325 row {
326 top= 77;
327 keys { { <KP0>, "KP0" }, { <KPDL>, "BOTM" } };
328 };
329 }; // End of "Keypad" section
330
331 }; // End of "applepro" geometry
332
333 xkb_geometry "macbook78" {
334
335 description= "Apple Laptop 78-key (US)";
336 width= 273;
337 height= 110;
338
339 shape.cornerRadius= 0;
340 shape "ESC" { { [ 21,9] }, cornerRadius=1, { [0,1], [ 19,8] } };
341 shape "FUNC" { { [ 18,9] }, cornerRadius=1, { [2,1], [ 16,8] } };
342 shape "EJCT" { { [ 20,9] }, cornerRadius=1, { [2,1], [ 20,8] } };
343 shape "DEGR" { { [ 16,18] }, cornerRadius=1, { [0,2], [ 14,16] } };
344 shape "NORM" { { [ 18,18] }, cornerRadius=1, { [2,2], [ 16,16] } };
345 shape "BKSP" { { [ 25,18] }, cornerRadius=1, { [2,2], [ 25,16] } };
346 shape "TABK" { { [ 24,18] }, cornerRadius=1, { [0,2], [ 22,16] } };
347 shape "BKSL" { { [ 17,18] }, cornerRadius=1, { [2,2], [17,16] } };
348 shape "RTRN" { { [ 31,18] }, cornerRadius=1, { [2,2], [31,16] } };
349 shape "CAPS" { { [ 29,18] }, cornerRadius=1, { [0,2], [ 27,16] } };
350 shape "LFSH" { { [ 40,18] }, cornerRadius=1, { [0,2], [ 38,16] } };
351 shape "RTSH" { { [ 39,18] }, cornerRadius=1, { [2,2], [ 39,16] } };
352 shape "APPL" { { [ 23,18] }, cornerRadius=1, { [2,2], [ 21,16] } };
353 shape "SPCE" { { [ 94,18] }, cornerRadius=1, { [2,2], [ 92,16] } };
354 shape "ARRO" { { [ 17,9] }, cornerRadius=1, { [2,1], [ 15,8] } };
355
356 shape "LED" { cornerRadius= 1, { [ 2, 2 ] } };
357
358 indicator.onColor= "green";
359 indicator.offColor= "gray";
360 indicator.shape= "LED";
361 indicator "Num Lock" { top=4; left= 119; };
362 indicator "Caps Lock" { top=53; left= 4; };
363
364 section.left=0;
365 row.left= 1;
366 key.shape= "FUNC";
367 key.gap= 1;
368 section "Function" {
369 top= 0;
370 row {
371 top= 1;
372 keys { {<ESC>, "ESC" },
373 <FK01>, <FK02>, <FK03>, <FK04>,
374 <FK05>, <FK06>, <FK07>, <FK08>,
375 <FK09>, <FK10>, <FK11>, <FK12>,
376 {<K6C>, "EJCT" }
377 };
378 };
379 }; // End of "Function" section
380
381 key.shape= "NORM";
382 section "Alpha" {
383 top= 10;
384 row {
385 top= 1;
386 keys { {<TLDE>, "DEGR"},
387 <AE01>, <AE02>, <AE03>, <AE04>,
388 <AE05>, <AE06>, <AE07>, <AE08>,
389 <AE09>, <AE10>, <AE11>, <AE12>,
390 { <BKSP>, "BKSP" }
391 };
392 };
393 row {
394 top= 20;
395 keys { { <TAB>, "TABK"},
396 <AD01>, <AD02>, <AD03>, <AD04>, <AD05>,
397 <AD06>, <AD07>, <AD08>, <AD09>, <AD10>,
398 <AD11>, <AD12>,
399 { <BKSL>, "BKSL" }
400 };
401 };
402 row {
403 top= 39;
404 keys { { <CAPS>, "CAPS" },
405 <AC01>, <AC02>, <AC03>, <AC04>, <AC05>,
406 <AC06>, <AC07>, <AC08>, <AC09>, <AC10>,
407 <AC11>,
408 { <RTRN>, "RTRN" }
409 };
410 };
411 row {
412 top= 58;
413 keys { { <LFSH>, "LFSH"},
414 <AB01>, <AB02>, <AB03>, <AB04>, <AB05>,
415 <AB06>, <AB07>, <AB08>, <AB09>, <AB10>,
416 { <RTSH>, "RTSH" }
417 };
418 };
419 row {
420 top= 77;
421 keys { {<FN>, "DEGR"},
422 <LCTL>, <LALT>,
423 {<LMTA>, "APPL"},
424 {<SPCE>, "SPCE" },
425 {<RMTA>, "APPL"},
426 <KPEN>
427 };
428 };
429
430 }; // End of "Alpha" section
431
432 key.shape= "ARRO";
433 section "Editing" {
434 top = 86;
435 left = 217;
436 row {
437 top= 1;
438 left= 19;
439 keys { <UP> };
440 };
441 row {
442 top= 10;
443 keys { <LEFT>, <DOWN>, <RGHT> };
444 };
445 }; // End of "Editing" section
446
447 alias <AC00> = <CAPS>;
448 alias <AA00> = <LCTL>;
449
450 };
451
452 xkb_geometry "macbook79" {
453
454 description= "Apple Laptop 79-key (Intl)";
455 width= 273;
456 height= 110;
457
458 shape.cornerRadius= 0;
459 shape "ESC" { { [ 21,9] }, cornerRadius=1, { [0,1], [ 19,8] } };
460 shape "FUNC" { { [ 18,9] }, cornerRadius=1, { [2,1], [ 16,8] } };
461 shape "EJCT" { { [ 20,9] }, cornerRadius=1, { [2,1], [ 20,8] } };
462 shape "DEGR" { { [ 16,18] }, cornerRadius=1, { [0,2], [ 14,16] } };
463 shape "NORM" { { [ 18,18] }, cornerRadius=1, { [2,2], [ 16,16] } };
464 shape "BKSP" { { [ 25,18] }, cornerRadius=1, { [2,2], [ 25,16] } };
465 shape "TABK" { { [ 24,18] }, cornerRadius=1, { [0,2], [ 22,16] } };
466 shape "RTRN" { { [ 0,0], [17,0], [17,37], [5,37], [5, 18], [0,18], [0,0] },
467 cornerRadius=1,
468 { [ 2,2], [15,2], [15,35], [7,35], [7, 16], [2,16] }
469 };
470 shape "CAPS" { { [ 29,18] }, cornerRadius=1, { [0,2], [ 27,16] } };
471 shape "LFSH" { { [ 21,18] }, cornerRadius=1, { [0,2], [ 19,16] } };
472 shape "RTSH" { { [ 39,18] }, cornerRadius=1, { [2,2], [ 39,16] } };
473 shape "APPL" { { [ 23,18] }, cornerRadius=1, { [2,2], [ 21,16] } };
474 shape "SPCE" { { [ 94,18] }, cornerRadius=1, { [2,2], [ 92,16] } };
475 shape "ARRO" { { [ 17,9] }, cornerRadius=1, { [2,1], [ 15,8] } };
476
477 shape "LED" { cornerRadius= 1, { [ 2, 2 ] } };
478
479 indicator.onColor= "green";
480 indicator.offColor= "gray";
481 indicator.shape= "LED";
482 indicator "Num Lock" { top=4; left= 119; };
483 indicator "Caps Lock" { top=53; left= 4; };
484
485 section.left=0;
486 row.left= 1;
487 key.shape= "FUNC";
488 key.gap= 1;
489 section "Function" {
490 top= 0;
491 row {
492 top= 1;
493 keys { {<ESC>, "ESC" },
494 <FK01>, <FK02>, <FK03>, <FK04>,
495 <FK05>, <FK06>, <FK07>, <FK08>,
496 <FK09>, <FK10>, <FK11>, <FK12>,
497 {<K6C>, "EJCT" }
498 };
499 };
500 }; // End of "Function" section
501
502 key.shape= "NORM";
503 section "Alpha" {
504 top= 10;
505 row {
506 top= 1;
507 keys { {<TLDE>, "DEGR"},
508 <AE01>, <AE02>, <AE03>, <AE04>,
509 <AE05>, <AE06>, <AE07>, <AE08>,
510 <AE09>, <AE10>, <AE11>, <AE12>,
511 { <BKSP>, "BKSP" }
512 };
513 };
514 row {
515 top= 20;
516 keys { { <TAB>, "TABK"},
517 <AD01>, <AD02>, <AD03>, <AD04>, <AD05>,
518 <AD06>, <AD07>, <AD08>, <AD09>, <AD10>,
519 <AD11>, <AD12>, { <RTRN>, "RTRN" }
520 };
521 };
522 row {
523 top= 39;
524 keys { { <CAPS>, "CAPS" },
525 <AC01>, <AC02>, <AC03>, <AC04>, <AC05>,
526 <AC06>, <AC07>, <AC08>, <AC09>, <AC10>,
527 <AC11>, <BKSL>
528 };
529 };
530 row {
531 top= 58;
532 keys { { <LFSH>, "LFSH"},
533 <LSGT>, <AB01>, <AB02>, <AB03>, <AB04>, <AB05>,
534 <AB06>, <AB07>, <AB08>, <AB09>, <AB10>,
535 { <RTSH>, "RTSH" }
536 };
537 };
538 row {
539 top= 77;
540 keys { {<FN>, "DEGR"},
541 <LCTL>, <LALT>,
542 {<LWIN>, "APPL"},
543 {<SPCE>, "SPCE" },
544 {<RALT>, "APPL"},
545 <KPEN>
546 };
547 };
548
549 }; // End of "Alpha" section
550
551 key.shape= "ARRO";
552 section "Editing" {
553 top = 86;
554 left = 217;
555 row {
556 top= 1;
557 left= 19;
558 keys { <UP> };
559 };
560 row {
561 top= 10;
562 keys { <LEFT>, <DOWN>, <RGHT> };
563 };
564 }; // End of "Editing" section
565
566 alias <AC00> = <CAPS>;
567 alias <AA00> = <LCTL>;
568
569 }; // End of "default" geometry
570
571