group revision 9184b9c8
1// The right Alt key (while pressed) chooses the second keyboard group. 2partial modifier_keys 3xkb_symbols "switch" { 4 key <RALT> { 5 symbols[Group1] = [ Mode_switch, Multi_key ], 6 virtualMods= AltGr 7 }; 8}; 9 10// The left Alt key (while pressed) chooses the second keyboard group. 11partial modifier_keys 12xkb_symbols "lswitch" { 13 key <LALT> { 14 symbols[Group1] = [ Mode_switch, Multi_key ], 15 virtualMods= AltGr 16 }; 17}; 18 19// Either Win key (while pressed) chooses the second keyboard group. 20partial modifier_keys 21xkb_symbols "win_switch" { 22 include "group(lwin_switch)" 23 include "group(rwin_switch)" 24}; 25 26// The left Win key (while pressed) chooses the second keyboard group. 27// (Using this map, you should declare your keyboard as pc101 or pc102 28// instead of pc104 or pc105.) 29partial modifier_keys 30xkb_symbols "lwin_switch" { 31 key <LWIN> { 32 symbols[Group1] = [ Mode_switch, Multi_key ], 33 virtualMods= AltGr 34 }; 35}; 36 37// The right Win key (while pressed) chooses the second keyboard group. 38// (Using this map, you should declare your keyboard as pc101 or pc102 39// instead of pc104 or pc105.) 40partial modifier_keys 41xkb_symbols "rwin_switch" { 42 key <RWIN> { 43 symbols[Group1] = [ Mode_switch, Multi_key ], 44 virtualMods= AltGr 45 }; 46}; 47 48// The right Ctrl key (while pressed) chooses the second keyboard group. 49// (Needed mainly for the Canadian keyboard.) 50partial modifier_keys 51xkb_symbols "rctrl_switch" { 52 key <RCTL> { 53 symbols[Group1] = [ Mode_switch ] 54 }; 55}; 56 57// Pressing the right Alt key switches to the next group. 58partial modifier_keys 59xkb_symbols "toggle" { 60 virtual_modifiers AltGr; 61 key <RALT> { 62 symbols[Group1] = [ ISO_Next_Group ], 63 virtualMods= AltGr 64 }; 65}; 66 67// Pressing both Shift keys switches to the next or previous group 68// (depending on which Shift is pressed first). 69partial modifier_keys 70xkb_symbols "shifts_toggle" { 71 key <LFSH> { [ Shift_L, ISO_Prev_Group ] }; 72 key <RTSH> { [ Shift_R, ISO_Next_Group ] }; 73}; 74 75// Pressing Shift+Caps_Lock switches to the next group. 76partial modifier_keys 77xkb_symbols "shift_caps_toggle" { 78 key <CAPS> { [ Caps_Lock, ISO_Next_Group ] }; 79}; 80 81// Pressing Caps_Lock selects the first group, 82// pressing Shift+Caps_Lock selects the last group. 83partial modifier_keys 84xkb_symbols "shift_caps_switch" { 85 key <CAPS> { [ ISO_First_Group, ISO_Last_Group ] }; 86}; 87 88// toggle using win + space as combo 89partial modifier_keys 90xkb_symbols "win_space_toggle" { 91 key <SPCE> { 92 type="PC_SUPER_LEVEL2", 93 symbols[Group1]= [ space, ISO_Next_Group ], 94 symbols[Group2]= [ space, ISO_Next_Group ] 95 }; 96}; 97 98// Pressing the left Win key selects the first group, 99// pressing the right Win or the Menu key selects the last group. 100partial modifier_keys 101xkb_symbols "win_menu_switch" { 102 virtual_modifiers AltGr; 103 key <LWIN> { 104 virtualMods= AltGr, 105 symbols[Group1] = [ ISO_First_Group ] 106 }; 107 key <MENU> { 108 virtualMods= AltGr, 109 symbols[Group1] = [ ISO_Last_Group ] 110 }; 111 key <RWIN> { 112 virtualMods= AltGr, 113 symbols[Group1] = [ ISO_Last_Group ] 114 }; 115}; 116 117// Pressing the left Ctrl key selects the first group, 118// pressing the right Ctrl key selects the last group. 119partial modifier_keys 120xkb_symbols "lctrl_rctrl_switch" { 121 virtual_modifiers AltGr; 122 key <LCTL> { 123 virtualMods= AltGr, 124 symbols[Group1] = [ ISO_First_Group ] 125 }; 126 key <RCTL> { 127 virtualMods= AltGr, 128 symbols[Group1] = [ ISO_Last_Group ] 129 }; 130}; 131 132 133// 134// CTRL-SHIFT toggle section 135// 136partial modifier_keys 137xkb_symbols "lctrl_lshift_toggle" { 138 key <LFSH> { 139 type[Group1]="PC_CONTROL_LEVEL2", 140 symbols[Group1] = [ Shift_L, ISO_Next_Group ] 141 }; 142 key <LCTL> { [ Control_L, ISO_Next_Group ] }; 143}; 144 145partial modifier_keys 146xkb_symbols "lctrl_lshift_toggle_rev" { 147 key <LFSH> { 148 type[Group1]="PC_CONTROL_LEVEL2", 149 symbols[Group1] = [ Shift_L, ISO_Prev_Group ] 150 }; 151 key <LCTL> { [ Control_L, ISO_Prev_Group ] }; 152}; 153 154partial modifier_keys 155xkb_symbols "rctrl_rshift_toggle" { 156 key <RTSH> { 157 type[Group1]="PC_CONTROL_LEVEL2", 158 symbols[Group1] = [ Shift_R, ISO_Next_Group ] 159 }; 160 key <RCTL> { [ Control_R, ISO_Next_Group ] }; 161}; 162 163partial modifier_keys 164xkb_symbols "ctrl_shift_toggle" { 165 include "group(lctrl_lshift_toggle)" 166 include "group(rctrl_rshift_toggle)" 167}; 168 169partial modifier_keys 170xkb_symbols "ctrl_shift_toggle_bidir" { 171 include "group(lctrl_lshift_toggle_rev)" 172 include "group(rctrl_rshift_toggle)" 173}; 174 175 176// 177// CTRL-ALT toggle section 178// 179partial modifier_keys 180xkb_symbols "lctrl_lalt_toggle" { 181 virtual_modifiers Alt; 182 key <LALT> { 183 type[Group1]="PC_CONTROL_LEVEL2", 184 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 185 virtualMods= Alt 186 }; 187 key <LCTL> { 188 type[Group1]="PC_ALT_LEVEL2", 189 symbols[Group1] = [ Control_L, ISO_Next_Group ] 190 }; 191}; 192 193partial modifier_keys 194xkb_symbols "lctrl_lalt_toggle_rev" { 195 virtual_modifiers Alt; 196 key <LALT> { 197 type[Group1]="PC_CONTROL_LEVEL2", 198 symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], 199 virtualMods= Alt 200 }; 201 key <LCTL> { 202 type[Group1]="PC_ALT_LEVEL2", 203 symbols[Group1] = [ Control_L, ISO_Prev_Group ] 204 }; 205}; 206 207partial modifier_keys 208xkb_symbols "rctrl_ralt_toggle" { 209 virtual_modifiers Alt; 210 key <RALT> { 211 type[Group1]="PC_CONTROL_LEVEL2", 212 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 213 virtualMods= Alt 214 }; 215 key <RCTL> { 216 type[Group1]="PC_ALT_LEVEL2", 217 symbols[Group1] = [ Control_R, ISO_Next_Group ] 218 }; 219}; 220 221partial modifier_keys 222xkb_symbols "ctrl_alt_toggle" { 223 include "group(lctrl_lalt_toggle)" 224 include "group(rctrl_ralt_toggle)" 225}; 226 227partial modifier_keys 228xkb_symbols "ctrl_alt_toggle_bidir" { 229 include "group(lctrl_lalt_toggle_rev)" 230 include "group(rctrl_ralt_toggle)" 231}; 232 233 234// 235// ALT-SHIFT toggle section 236// 237partial modifier_keys 238xkb_symbols "lalt_lshift_toggle" { 239 virtual_modifiers Alt; 240 key <LALT> { 241 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 242 virtualMods= Alt 243 }; 244 key <LFSH> { 245 type[Group1]="PC_ALT_LEVEL2", 246 symbols[Group1] = [ Shift_L, ISO_Next_Group ] 247 }; 248}; 249 250partial modifier_keys 251xkb_symbols "lalt_lshift_toggle_rev" { 252 virtual_modifiers Alt; 253 key <LALT> { 254 symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], 255 virtualMods= Alt 256 }; 257 key <LFSH> { 258 type[Group1]="PC_ALT_LEVEL2", 259 symbols[Group1] = [ Shift_L, ISO_Prev_Group ] 260 }; 261}; 262 263partial modifier_keys 264xkb_symbols "ralt_rshift_toggle" { 265 virtual_modifiers Alt; 266 key <RALT> { 267 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 268 virtualMods= Alt 269 }; 270 key <RTSH> { 271 type[Group1]="PC_ALT_LEVEL2", 272 symbols[Group1] = [ Shift_R, ISO_Next_Group ] 273 }; 274}; 275 276partial modifier_keys 277xkb_symbols "alt_shift_toggle" { 278 include "group(lalt_lshift_toggle)" 279 include "group(ralt_rshift_toggle)" 280}; 281 282partial modifier_keys 283xkb_symbols "alt_shift_toggle_bidir" { 284 include "group(lalt_lshift_toggle_rev)" 285 include "group(ralt_rshift_toggle)" 286}; 287 288 289// Pressing the Menu key switches to the next group, 290// while Shift+Menu acts as Menu. 291partial modifier_keys 292xkb_symbols "menu_toggle" { 293 key <MENU> { [ ISO_Next_Group, Menu ] }; 294}; 295 296// Pressing the left Win key switches to the next group. 297// (Using this map, you should declare your keyboard as 298// pc101 or pc102 instead of pc104 or pc105.) 299partial modifier_keys 300xkb_symbols "lwin_toggle" { 301 virtual_modifiers AltGr; 302 key <LWIN> { 303 virtualMods= AltGr, 304 symbols[Group1] = [ ISO_Next_Group ] 305 }; 306}; 307 308// Pressing the right Win key switches to the next group. 309// (Using this map, you should declare your keyboard as 310// pc101 or pc102 instead of pc104 or pc105.) 311partial modifier_keys 312xkb_symbols "rwin_toggle" { 313 virtual_modifiers AltGr; 314 key <RWIN> { 315 virtualMods= AltGr, 316 symbols[Group1] = [ ISO_Next_Group ] 317 }; 318}; 319 320// Pressing both Ctrl keys switches to the next or previous group 321// (depending on which Ctrl is pressed first). 322partial modifier_keys 323xkb_symbols "ctrls_toggle" { 324 virtual_modifiers LControl, RControl; 325 key <LCTL> { 326 type[Group1]="PC_CONTROL_LEVEL2", 327 symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], 328 virtualMods= LControl 329 }; 330 key <RCTL> { 331 type[Group1]="PC_CONTROL_LEVEL2", 332 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 333 virtualMods= RControl 334 }; 335}; 336 337// Pressing both Alt switches to the next or previous group 338// (depending on which Alt is pressed first). 339partial modifier_keys 340xkb_symbols "alts_toggle" { 341 virtual_modifiers LAlt, RAlt; 342 key <LALT> { 343 type[Group1]="PC_RALT_LEVEL2", 344 symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], 345 virtualMods= LAlt 346 }; 347 key <RALT> { 348 type[Group1]="PC_LALT_LEVEL2", 349 symbols[Group1] = [ NoSymbol, ISO_Next_Group ], 350 virtualMods= RAlt 351 }; 352}; 353 354// Pressing the left Shift key switches to the next group. 355partial modifier_keys 356xkb_symbols "lshift_toggle" { 357 virtual_modifiers AltGr; 358 key <LFSH> { 359 symbols[Group1] = [ ISO_Next_Group ], 360 virtualMods= AltGr 361 }; 362}; 363 364// Pressing the right Shift key switches to the next group. 365partial modifier_keys 366xkb_symbols "rshift_toggle" { 367 virtual_modifiers AltGr; 368 key <RTSH> { 369 symbols[Group1] = [ ISO_Next_Group ], 370 virtualMods= AltGr 371 }; 372}; 373 374// Pressing the left Alt key switches to the next group. 375partial modifier_keys 376xkb_symbols "lalt_toggle" { 377 virtual_modifiers AltGr; 378 key <LALT> { 379 symbols[Group1] = [ ISO_Next_Group ], 380 virtualMods= AltGr 381 }; 382}; 383 384// Pressing the left Ctrl key switches to the next group. 385partial modifier_keys 386xkb_symbols "lctrl_toggle" { 387 virtual_modifiers AltGr; 388 key <LCTL> { 389 symbols[Group1] = [ ISO_Next_Group ], 390 virtualMods= AltGr 391 }; 392}; 393 394// Pressing the right Ctrl key switches to the next group. 395partial modifier_keys 396xkb_symbols "rctrl_toggle" { 397 virtual_modifiers AltGr; 398 key <RCTL> { 399 symbols[Group1] = [ ISO_Next_Group ], 400 virtualMods= AltGr 401 }; 402}; 403 404// Pressing Alt+Caps_Lock switches to the next group, 405// pressing Caps_Lock toggles CapsLock. 406partial modifier_keys 407xkb_symbols "alt_caps_toggle" { 408 key <CAPS> { 409 type="PC_ALT_LEVEL2", 410 symbols[Group1] = [ Caps_Lock, ISO_Next_Group ] 411 }; 412}; 413 414hidden partial modifier_keys 415xkb_symbols "olpc" { 416 key <I219> { [ ISO_Next_Group, ISO_Prev_Group ] }; 417}; 418 419partial modifier_keys 420xkb_symbols "alt_space_toggle" { 421 key <SPCE> { 422 type[Group1]="PC_ALT_LEVEL2", 423 symbols[Group1] = [ space, ISO_Next_Group ] 424 }; 425}; 426 427// Pressing the Scroll Lock key switches to the next group, 428partial modifier_keys 429xkb_symbols "sclk_toggle" { 430 virtual_modifiers AltGr; 431 key <SCLK> { 432 virtualMods= AltGr, 433 symbols[Group1] = [ ISO_Next_Group ] 434 }; 435}; 436 437// Control_L+Win_L selects the first group (presumably Lat), 438// Control_R+Menu selects the second group (presumably Rus). 439partial modifier_keys 440xkb_symbols "lctrl_lwin_rctrl_menu" { 441 key <LWIN> { 442 type[Group1] = "PC_CONTROL_LEVEL2", 443 symbols[Group1] = [ Super_L, ISO_First_Group ] 444 }; 445 key <MENU> { 446 type[Group1] = "PC_CONTROL_LEVEL2", 447 symbols[Group1] = [ Menu, ISO_Last_Group ] 448 }; 449}; 450 451// Control_L+Win_L toggles groups. 452partial modifier_keys 453xkb_symbols "lctrl_lwin_toggle" { 454 key <LWIN> { 455 type[ Group1 ] = "PC_CONTROL_LEVEL2", 456 symbols[ Group1 ] = [ Super_L, ISO_Next_Group ] 457 }; 458}; 459 460