summaryrefslogtreecommitdiff
path: root/geometry/macintosh
blob: f97251fc9e087808d354ab0b465c33e5e979defa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// $XFree86: xc/programs/xkbcomp/geometry/macintosh,v 1.3 2003/08/09 14:30:47 pascal Exp $
//
// Some modifications (<eqdar@castalie.org>) :
// - Added a <LSGT> key
// - Fixed the shape of the <RTRN> key
// - Moved <BKSL> to the 'AC' row
// - Added a special Macintosh sysctl key
// - Minor changes (Function keys shape, LED position...)

default xkb_geometry "macintosh" {

    description= "Apple Extended Keyboard II";
    width = 475;
    height = 194;

    shape.cornerRadius= 1;
    shape "NORM" { { [ 18,18] }, { [2,1], [ 16,17] } };
    shape "TLDE" { { [ 23,18] }, { [2,1], [ 21,17] } };
    shape "BKSP" { { [ 33,18] }, { [2,1], [ 31,17] } };
    shape "TAB"  { { [ 33,18] }, { [2,1], [ 31,17] } };
    shape "RTRN" { 
        { [0,0],[23,0],[23,37],[4,37],[4,18],[0,18] }, 
        { [2,1],[21,1],[21,36],[6,36],[6,17],[2,17] } };
    shape "CAPS" { { [ 37,18] }, { [2,1], [ 35,17] } };
    shape "LCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
    shape "LALT" { { [ 22,18] }, { [2,1], [ 20,17] } };
    shape "LMTA" { { [ 28,18] }, { [2,1], [ 26,17] } };
    shape "LFSH" { { [ 28,18] }, { [2,1], [ 26,17] } };
    shape "RCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
    shape "RALT" { { [ 22,18] }, { [2,1], [ 20,17] } };
    shape "RMTA" { { [ 28,18] }, { [2,1], [ 26,17] } };
    shape "RTSH" { { [ 47,18] }, { [2,1], [ 45,17] } };
    shape "SPCE" { { [123,18] }, { [2,1], [121,17] } };
    shape "KP0"  { { [ 37,18] }, { [2,1], [ 35,17] } };
    shape "KPEN" { { [ 18,37] }, { [2,1], [ 16,36] } };
    // Macintosh keyboards have a special sysctl key at the top right
    shape "AAPL" { 
        { [ 0,0], [ 18,0], [ 18,18], [ 0,18] },
        { [ 1,1], [ 17,1], [ 17,17], [ 1,17] },
        { [ 8,5], [ 8,12], [  2,9] } };

    shape "LEDS" { cornerRadius = 0, { [ 55,19] } };
    shape "LED"  { cornerRadius = 0, { [  8, 2] } };

    solid "LedPanel" {
	shape= "LEDS";
        top = 48;
        left = 378;
    };

    indicator.onColor= "green";
    indicator.offColor= "green30";
    indicator.top = 50;
    indicator.shape= "LED";
    indicator "NumLock"    { left = 381; };
    indicator "CapsLock"   { left = 398; };
    indicator "ScrollLock" { left = 415; };
    text.top= 55;
    text.color= "black";
    text "NumLockLabel"    { left = 381; text = "Num\nLock";    };
    text "CapsLockLabel"   { left = 398; text = "Caps\nLock";   };
    text "ScrollLockLabel" { left = 415; text = "Scroll\nLock"; };

    section.left= 19;
    row.left= 1;
    key.shape= "NORM";
    key.gap=  1;

    section "Function" {
        top = 48;
	row {
	    top= 1;
            keys { <ESC>, 
                   { <FK01>, 20 }, <FK02>, <FK03>, <FK04>,
                   { <FK05>, 11 }, <FK06>, <FK07>, <FK08>,
                   { <FK09>, 11 }, <FK10>, <FK11>, <FK12>,
                   { <PRSC>, 10 }, <SCLK>, <PAUS>,
                   // This is the sysctl key on macintosh keyboards
                   // keycode is 222 with a 4.21 kernel, which is <I5E>
                   { <I5E>, "AAPL", 67 }
	    };
	};
    }; // End of "Function" section

    section "Alpha" {
        top = 87;
	row {
	    top= 1;
            keys { { <TLDE>, "TLDE" }, <AE01>, <AE02>, <AE03>,
                   <AE04>, <AE05>, <AE06>, <AE07>, <AE08>, <AE09>,
		   <AE10>, <AE11>, <AE12>, { <BKSP>, "BKSP" }
	    };
	};
	row {
	    top= 20;
	    keys { { <TAB>, "TAB" },  <AD01>, <AD02>, <AD03>,
                   <AD04>, <AD05>, <AD06>, <AD07>, <AD08>, <AD09>,
                   <AD10>, <AD11>, <AD12>, { <RTRN>, "RTRN" }
	    };
	};
	row {
	    top= 39;
	    keys { { <CAPS>, "CAPS" }, <AC01>, <AC02>, <AC03>,
                   <AC04>, <AC05>, <AC06>, <AC07>, <AC08>, <AC09>,
                   <AC10>, <AC11>, <BKSL>
	    };
	};
	row {
	    top= 58;
            keys { { <LFSH>, "LFSH" }, <LSGT>, <AB01>, <AB02>,
                   <AB03>, <AB04>, <AB05>, <AB06>, <AB07>, <AB08>,
                   <AB09>, <AB10>, { <RTSH>, "RTSH" }
	    };
	};
	row {
	    top= 77;
	    keys { { <LCTL>, "LCTL" }, { <LALT>, "LALT" },
                   { <LMTA>, "LMTA" },
                   { <SPCE>, "SPCE" }, 
                   { <RMTA>, "RMTA" },
	           { <RALT>, "RALT" }, { <RCTL>, "RCTL" }
	    };
	};
    }; // End of "Alpha" section

    section "Editing" {
        top = 87;
        left = 314;
	row {
	    top= 1;
	    keys { <INS>, <HOME>, <PGUP> };
	};
        row {
	    top= 20;
	    keys { <DELE>, <END>, <PGDN> };
	};
	row {
	    top= 58;
	    left= 20;
	    keys { <UP> };
	};
	row {
	    top= 77;
	    keys { <LEFT>, <DOWN>, <RGHT> };
	};
    }; // End of "Editing" section

    // Begin of "Keypad" section
    section "Keypad" {
        top = 87;
        left = 380;
	row {
	    top= 1;
            keys { <NMLK>, <KPEQ>, <KPDV>, <KPMU> };
	};
	row {
	    top= 20;
	    keys { <KP7>, <KP8>, <KP9>, <KPSU> };
	};
	row {
	    top= 39;
	    keys { <KP4>, <KP5>, <KP6>, <KPAD> };
	};
	row {
	    top= 58;
	    keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPEN" } };
	};
	row {
	    top= 77;
	    keys { { <KP0>, "KP0" },  <KPDL> };
	};
    }; // End of "Keypad" section

}; // End of "default" geometry