licensed under mit/x11
[xorg/xkeyboard-config] / geometry / hhk
1 //      $XKeyboardConfig$
2 //
3 //      XKB geometry for the Happy Hacking Keyboard (Lite).
4 //      Different variants correspond to different switch
5 //      settings on the HHK.
6 //
7 //  Copyright (c) Doug Palmer <doug@charvolant.org>, 2002
8 //
9 //Permission is hereby granted, free of charge, to any person obtaining a copy
10 //of this software and associated documentation files (the "Software"), to deal
11 //in the Software without restriction, including without limitation the rights
12 //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 //copies of the Software, and to permit persons to whom the Software is
14 //furnished to do so, subject to the following conditions:
15 //
16 //The above copyright notice and this permission notice shall be included in
17 //all copies or substantial portions of the Software.
18 //
19 //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 //THE SOFTWARE.
26
27 // SW = 100 Default layout with windows keys
28 default xkb_geometry "win1" {
29         include "hhk(basic)"
30
31         key.gap = 1;
32         section "Space" {
33                 top = 86;
34                 left = 30;
35                 row {
36                         top = 1;
37                         keys {
38                                 <LALT>,
39                                 { <LWIN>, "DIAM" },
40                                 { <SPCE>, "SPCE" },
41                                 { <RWIN>, "DIAM" },
42                                 <RALT>
43                         };
44                 };
45         };
46 };
47
48 // SW = 101 Layout with windows and alt keys swapped
49 xkb_geometry "win2" {
50         include "hhk(basic)"
51
52         key.gap = 1;
53         section "Space" {
54                 top = 86;
55                 left = 30;
56                 row {
57                         top = 1;
58                         keys {
59                                 <LWIN>,
60                                 { <LALT>, "DIAM" },
61                                 { <SPCE>, "SPCE" },
62                                 { <RALT>, "DIAM" },
63                                 <RWIN>
64                         };
65                 };
66         };
67 };
68
69 // SW = 110 Default layout with windows keys, and left diamond = Fn key
70 xkb_geometry "win3" {
71         include "hhk(basic)"
72
73         key.gap = 1;
74         section "Space" {
75                 top = 86;
76                 left = 30;
77                 row {
78                         top = 1;
79                         keys {
80                                 <LALT>,
81                                 { <FN>, "DIAM" },
82                                 { <SPCE>, "SPCE" },
83                                 { <RWIN>, "DIAM" },
84                                 <RALT>
85                         };
86                 };
87         };
88 };
89
90 // SW = 101 Layout with windows and alt keys swapped and left-Alt = Fn key
91 xkb_geometry "win4" {
92         include "hhk(basic)"
93
94         key.gap = 1;
95         section "Space" {
96                 top = 86;
97                 left = 30;
98                 row {
99                         top = 1;
100                         keys {
101                                 <FN>,
102                                 { <LALT>, "DIAM" },
103                                 { <SPCE>, "SPCE" },
104                                 { <RALT>, "DIAM" },
105                                 <RWIN>
106                         };
107                 };
108         };
109 };
110
111 // SW = 000 Layout with Muhenkan and Henkan keys
112 xkb_geometry "jp1" {
113         include "hhk(basic)"
114
115         key.gap = 1;
116         section "Space" {
117                 top = 86;
118                 left = 30;
119                 row {
120                         top = 1;
121                         keys {
122                                 <LALT>,
123                                 { <NFER>, "DIAM" },
124                                 { <SPCE>, "SPCE" },
125                                 { <XFER>, "DIAM" },
126                                 <RALT>
127                         };
128                 };
129         };
130 };
131
132 // SW = 001 Layout with Muhenkan and Henkan keys swapped with Alt keys
133 xkb_geometry "jp2" {
134         include "hhk(basic)"
135
136         key.gap = 1;
137         section "Space" {
138                 top = 86;
139                 left = 30;
140                 row {
141                         top = 1;
142                         keys {
143                                 <NFER>,
144                                 { <LALT>, "DIAM" },
145                                 { <SPCE>, "SPCE" },
146                                 { <RALT>, "DIAM" },
147                                 <XFER>
148                         };
149                 };
150         };
151 };
152
153 // SW = 010 Layout with Henkan key and left-diamond as Fn
154 xkb_geometry "jp3" {
155         include "hhk(basic)"
156
157         key.gap = 1;
158         section "Space" {
159                 top = 86;
160                 left = 30;
161                 row {
162                         top = 1;
163                         keys {
164                                 <LALT>,
165                                 { <FN>, "DIAM" },
166                                 { <SPCE>, "SPCE" },
167                                 { <XFER>, "DIAM" },
168                                 <RALT>
169                         };
170                 };
171         };
172 };
173
174 // SW = 001 Layout with Henkan key swapped with Alt keys and left-Alt as Fn
175 xkb_geometry "jp4" {
176         include "hhk(basic)"
177
178         key.gap = 1;
179         section "Space" {
180                 top = 86;
181                 left = 30;
182                 row {
183                         top = 1;
184                         keys {
185                                 <FN>,
186                                 { <LALT>, "DIAM" },
187                                 { <SPCE>, "SPCE" },
188                                 { <RALT>, "DIAM" },
189                                 <XFER>
190                         };
191                 };
192         };
193 };
194
195 // Basic layout for non-swictchable keys
196 partial hidden xkb_geometry "basic" {
197
198         description = "Happy Hacking Keyboard";
199         width = 290;
200         height = 106;
201         
202         shape.cornerRadius = 1;
203         shape "NORM" { { [18, 18] }, { [2, 1], [14, 14] } };
204         shape "BKSP" { { [28, 18] }, { [2, 1], [24, 14] } };
205         shape "TABK" { { [28, 18] }, { [2, 1], [24, 14] } };
206         shape "CTRL" { { [32, 18] }, { [2, 1], [28, 14] } };
207         shape "RTRN" { { [42, 18] }, { [2, 1], [38, 14] } };
208         shape "LFSH" { { [42, 18] }, { [2, 1], [38, 14] } };
209         shape "RTSH" { { [32, 18] }, { [2, 1], [28, 14] } };
210         shape "DIAM" { { [28, 18] }, { [2, 1], [24, 14] } };
211         shape "SPCE" { { [114, 18] }, { [2, 1], [110, 14] } };
212
213         text.color = "black";
214         text "PFULabel" { left = 16; top = 2; fontsize = 20; text = "PFU"; };
215         text "HHKLabel" { left = 254; top = 90; text = "Happy Hacking\nKeyboard"; };
216
217         section.left = 1;
218         row.left = 1;
219         key.shape = "NORM";
220         key.gap = 1;
221
222         section "Alphanumeric" {
223                 top = 10;
224                 row {
225                         top = 1;
226                         keys {
227                                  <ESC>, 
228                                 <AE01>, <AE02>, <AE03>, <AE04>, <AE05>, 
229                                 <AE06>, <AE07>, <AE08>, <AE09>, <AE10>, 
230                                 <AE11>, <AE12>, 
231                                 <BKSL>, <TLDE>
232                         };
233                 };
234                 row {
235                         top = 20;
236                         keys {
237                                 { <TAB>, "TABK" },
238                                 <AD01>, <AD02>, <AD03>, <AD04>, <AD05>,
239                                 <AD06>, <AD07>, <AD08>, <AD09>, <AD10>,
240                                 <AD11>, <AD12>,
241                                 { <BKSP>, "BKSP" }
242                         };
243                 };
244                 row {
245                         top = 39;
246                         keys {
247                                 { <LCTL>, "CTRL" },
248                                 <AC01>, <AC02>, <AC03>, <AC04>, <AC05>,
249                                 <AC06>, <AC07>, <AC08>, <AC09>, <AC10>,
250                                 <AC11>, 
251                                 { <RTRN>, "RTRN" }
252                         };
253                 };
254                 row {
255                         top = 58;
256                         keys {
257                                 { <LFSH>, "LFSH" },
258                                 <AB01>, <AB02>, <AB03>, <AB04>, <AB05>,
259                                 <AB06>, <AB07>, <AB08>, <AB09>, <AB10>,
260                                 { <RTSH>, "RTSH" },
261                                 { <FN>, color = "grey20" }
262                         };
263                 };
264         };
265
266         alias <AC00> = <LCTL>;
267 };
268