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