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