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