apple revision 1.1.1.2 1 //
2 // Keyboard modification for Apple keyboards
3 //
4 // $XFree86: xc/programs/xkbcomp/symbols/apple,v 1.2 2003/10/24 20:38:20 tsi Exp $
5
6 partial default modifier_keys
7 xkb_symbols "extended" {
8
9 key <KPEQ> { [ KP_Equal ] };
10
11 // The key in the PC's Insert position is sometimes engraved Help (at least
12 // in Switzerland and Great Britain), with Insert sometimes above. But in the
13 // US and Canada, it remains Insert. So this should probably be an XkbOption,
14 // but I have to do more research.
15 // Perhaps Help should be the primary symbol with Insert in the 1st shift-level
16 // key <INS> { [ Help, Insert ] };
17 // The keys next to F12, labeled F13, F14, & F15 generate codes that XFree86
18 // claims not to generate. I think they should be equivalent to the PC keys
19 // Print Screen / SysRq, Scroll Lock, and Pause. Linux kernel bug?
20 // key <PRSC> { [ F13 ] }; // should be keycode 93 or
21 // key <FK13> { [ F13 ] }; // should be keycode 118
22 // key <SCLK> { [ F14 ] }; // should be keycode 123 or
23 // key <FK14> { [ F14 ] }; // should be keycode 119
24 // key <PAUS> { [ F15 ] }; // should be keycode 127 or
25 // key <FK15> { [ F15 ] }; // should be keycode 120
26 };
27
28 partial modifier_keys
29 xkb_symbols "laptop" {
30
31 include "macintosh_vndr/apple(extended)"
32
33 // The real numlock key on the iBook (shared with F5) works internally to
34 // the keyboard. It illuminates the Num_Lock led and locks the fn-key to
35 // type only the keypad keys on the letter keys (U=4, I=5, O=6, P=*, etc.).
36 // The key in the Num_lock position is engraved with Clear.
37 override key <NMLK> { [ Clear ] };
38 // The key engraved Delete sends BKSP. To get Delete, use Shift-Delete
39 override key <BKSP> { [ BackSpace, Delete ] };
40 // These keyboards only generate a <RALT> when pressing fn+Alt. This makes
41 // it impossible to get to the third shift level on keys that are on
42 // the fn-keypad, so use the Enter key (right of <SPC>) for Mode_switch,
43 // and use fn+Enter (Apple's code for Menu) for KP_Enter.
44 replace key <KPEN> { [ ISO_Level3_Shift ] };
45 modifier_map Mod5 { ISO_Level3_Shift };
46 // Linux kernel bug with Menu on macs means this doesn't work yet
47 // replace key <MENU> { [ KP_Enter ] }; // should be keycode 117
48 };
49
50 partial modifier_keys
51 xkb_symbols "laptop_bad_switch" {
52 // Kept for backward compatibility
53 include "macintosh_vndr/apple(laptop)"
54 };
55
56 // Long Aluminium Keyboards
57 partial function_keys
58 xkb_symbols "alukbd" {
59 // The base is a inet PC keyboard
60 include "pc"
61
62 // Additional Fxx keys
63 key <FK13> { [ F13 ] };
64 key <FK14> { [ F14 ] };
65 key <FK15> { [ F15 ] };
66 key <FK16> { [ F16 ] };
67 key <FK17> { [ F17 ] };
68 key <FK18> { [ F18 ] };
69 key <FK19> { [ F19 ] };
70
71 // On aluminium keyboards, Num_Lock is replace by Clear
72 replace key <NMLK> { [ XF86Clear ] };
73 // CAPS key is always Caps_Lock, even for JIS keyboards
74 replace key <CAPS> { [ Caps_Lock ] };
75
76 // F1..F12 are multimedia keys when used with the 'Fn' key
77 // Make those multimedia actions available via ISO_Level3_Shift too,
78 // it is useful when the Fn key is remapped to something else (e.g. Insert)
79 key <FK01> {
80 type= "FOUR_LEVEL_X",
81 symbols[Group1]= [ NoSymbol, XF86KbdBrightnessDown, NoSymbol, XF86_Switch_VT_1 ]
82 };
83 key <FK02> {
84 type= "FOUR_LEVEL_X",
85 symbols[Group1]= [ NoSymbol, XF86KbdBrightnessUp, NoSymbol, XF86_Switch_VT_2 ]
86 };
87 key <FK03> {
88 type= "FOUR_LEVEL_X",
89 symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_3 ]
90 };
91 key <FK04> {
92 type= "FOUR_LEVEL_X",
93 symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_4 ]
94 };
95 key <FK05> {
96 type= "FOUR_LEVEL_X",
97 symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_5 ]
98 };
99 key <FK06> {
100 type= "FOUR_LEVEL_X",
101 symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_6 ]
102 };
103 key <FK07> {
104 type= "FOUR_LEVEL_X",
105 symbols[Group1]= [ NoSymbol, XF86AudioPrev, NoSymbol, XF86_Switch_VT_7 ]
106 };
107 key <FK08> {
108 type= "FOUR_LEVEL_X",
109 symbols[Group1]= [ NoSymbol, XF86AudioPlay, NoSymbol, XF86_Switch_VT_8 ]
110 };
111 key <FK09> {
112 type= "FOUR_LEVEL_X",
113 symbols[Group1]= [ NoSymbol, XF86AudioNext, NoSymbol, XF86_Switch_VT_9 ]
114 };
115 key <FK10> {
116 type= "FOUR_LEVEL_X",
117 symbols[Group1]= [ NoSymbol, XF86AudioMute, NoSymbol, XF86_Switch_VT_10 ]
118 };
119 key <FK11> {
120 type= "FOUR_LEVEL_X",
121 symbols[Group1]= [ NoSymbol, XF86AudioLowerVolume, NoSymbol, XF86_Switch_VT_11 ]
122 };
123 key <FK12> {
124 type= "FOUR_LEVEL_X",
125 symbols[Group1]= [ NoSymbol, XF86AudioRaiseVolume, NoSymbol, XF86_Switch_VT_12 ]
126 };
127 };
128
129 // Aluminium Keyboard: make F13, F14, F15 PC-ish (Print, Scroll_Lock, Pause)
130 partial function_keys keypad_keys
131 xkb_symbols "alupckeys" {
132 key <FK13> {
133 type= "PC_ALT_LEVEL2",
134 symbols[Group1]= [ Print, Sys_Req ]
135 };
136 key <FK14> { [ Scroll_Lock ] };
137 key <FK15> {
138 type= "PC_CONTROL_LEVEL2",
139 symbols[Group1]= [ Pause, Break ]
140 };
141 override key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
142 };
143