Home | History | Annotate | Download | only in symbols
      1 // These partial variants assign ISO_Level5_Shift to various XKB keycodes
      2 // so that the fifth shift level can be reached.
      3 
      4 // The right Ctrl key (while pressed) chooses the fifth shift level.
      5 partial modifier_keys
      6 xkb_symbols "rctrl_switch" {
      7   key <RCTL> {
      8     type[Group1]="ONE_LEVEL",
      9     symbols[Group1] = [ ISO_Level5_Shift ]
     10   };
     11   include "level5(modifier_mapping)"
     12 };
     13 
     14 // The Less/Greater key (while pressed) chooses the fifth shift level.
     15 partial modifier_keys
     16 xkb_symbols "lsgt_switch" {
     17   key <LSGT> {
     18     type[Group1]="ONE_LEVEL",
     19     symbols[Group1] = [ ISO_Level5_Shift ]
     20   };
     21   include "level5(modifier_mapping)"
     22 };
     23 
     24 // The right Alt key (while pressed) chooses the fifth shift level.
     25 partial modifier_keys
     26 xkb_symbols "ralt_switch" {
     27   key <RALT> {
     28     type[Group1]="ONE_LEVEL",
     29     symbols[Group1] = [ ISO_Level5_Shift ]
     30   };
     31   include "level5(modifier_mapping)"
     32 };
     33 
     34 // Ensure a mapping to a real modifier for LevelFive.
     35 partial modifier_keys
     36 xkb_symbols "modifier_mapping" {
     37   replace key <MDSW> {
     38     type[Group1] = "ONE_LEVEL",
     39     symbols[Group1] = [ ISO_Level5_Shift ]
     40   };
     41   modifier_map Mod3 { <MDSW> };
     42 };
     43 
     44 
     45 // This adds the definitions needed to create a level5-lock behaviour, using
     46 // the real modifier NumLock as a lock indicator.
     47 // See also: types/level5 : EIGHT_LEVEL_LEVEL_FIVE_LOCK
     48 // See also: compat/level5(level5_lock)
     49 partial modifier_keys
     50 xkb_symbols "lock" {
     51   key.type[Group1] = "ONE_LEVEL";
     52   include "level5(modifier_mapping)"
     53   replace key <HYPR> {
     54     vmods = NumLock,
     55     symbols[Group1] = [ NoSymbol ],
     56     actions[Group1] = [ SetMods(modifiers=NumLock) ]
     57   };
     58   modifier_map Mod2 { <HYPR> };
     59 };
     60 
     61 // The following modifier keys are used to switch to the third shift level
     62 // and to set a corresponding lock, implemented as NumLock.
     63 
     64 partial modifier_keys
     65 xkb_symbols "lsgt_switch_lock" {
     66   include "level5(lock)"
     67   key <LSGT> {
     68     type[Group1] = "EIGHT_LEVEL",
     69     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
     70                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
     71   };
     72 };
     73 
     74 partial modifier_keys
     75 xkb_symbols "lwin_switch_lock" {
     76   include "level5(lock)"
     77   key <LWIN> {
     78     type[Group1] = "EIGHT_LEVEL",
     79     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
     80                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
     81   };
     82 };
     83 
     84 partial modifier_keys
     85 xkb_symbols "ralt_switch_lock" {
     86   include "level5(lock)"
     87   key <RALT> {
     88     type[Group1] = "EIGHT_LEVEL",
     89     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
     90                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
     91   };
     92 };
     93 
     94 partial modifier_keys
     95 xkb_symbols "rwin_switch_lock" {
     96   include "level5(lock)"
     97   key <RWIN> {
     98     type[Group1] = "EIGHT_LEVEL",
     99     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
    100                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
    101   };
    102 };
    103 
    104 partial modifier_keys
    105 xkb_symbols "lsgt_switch_lock_cancel" {
    106   include "level5(lock)"
    107   key <LSGT> {
    108     type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
    109     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
    110                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
    111   };
    112 };
    113 
    114 partial modifier_keys
    115 xkb_symbols "lwin_switch_lock_cancel" {
    116   include "level5(lock)"
    117   key <LWIN> {
    118     type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
    119     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
    120                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
    121   };
    122 };
    123 
    124 partial modifier_keys
    125 xkb_symbols "ralt_switch_lock_cancel" {
    126   include "level5(lock)"
    127   key <RALT> {
    128     type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
    129     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
    130                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
    131   };
    132 };
    133 
    134 partial modifier_keys
    135 xkb_symbols "rwin_switch_lock_cancel" {
    136   include "level5(lock)"
    137   key <RWIN> {
    138     type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
    139     symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
    140                         ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
    141   };
    142 };
    143