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