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