1// Cancel CapsLock when a Shift key is pressed. 2partial modifier_keys 3xkb_symbols "breaks_caps" { 4 key <LFSH> { 5 type = "ALPHABETIC", 6 actions [Group1] = [ 7 SetMods(modifiers=Shift), 8 SetMods(modifiers=Shift+Lock,clearLocks) 9 ] 10 }; 11 key <RTSH> { 12 type = "ALPHABETIC", 13 actions [Group1] = [ 14 SetMods(modifiers=Shift), 15 SetMods(modifiers=Shift+Lock,clearLocks) 16 ] 17 }; 18}; 19 20 21// Toggle CapsLock when pressed together with the other Shift key. 22partial modifier_keys 23xkb_symbols "lshift_both_capslock" { 24 key <LFSH> { 25 type[Group1]="TWO_LEVEL", 26 symbols[Group1] = [ Shift_L, Caps_Lock ] 27 }; 28}; 29// Toggle CapsLock when pressed together with the other Shift key. 30partial modifier_keys 31xkb_symbols "rshift_both_capslock" { 32 key <RTSH> { 33 type[Group1]="TWO_LEVEL", 34 symbols[Group1] = [ Shift_R, Caps_Lock ] 35 }; 36}; 37partial modifier_keys 38xkb_symbols "both_capslock" { 39 include "shift(lshift_both_capslock)" 40 include "shift(rshift_both_capslock)" 41}; 42 43 44// Set CapsLock when pressed with the other Shift key, release it when pressed alone. 45partial modifier_keys 46xkb_symbols "lshift_both_capslock_cancel" { 47 key <LFSH> { 48 type[Group1]="ALPHABETIC", 49 symbols[Group1] = [ Shift_L, Caps_Lock ] 50 }; 51}; 52// Set CapsLock when pressed with the other Shift key, release it when pressed alone. 53partial modifier_keys 54xkb_symbols "rshift_both_capslock_cancel" { 55 key <RTSH> { 56 type[Group1]="ALPHABETIC", 57 symbols[Group1] = [ Shift_R, Caps_Lock ] 58 }; 59}; 60partial modifier_keys 61xkb_symbols "both_capslock_cancel" { 62 include "shift(lshift_both_capslock_cancel)" 63 include "shift(rshift_both_capslock_cancel)" 64}; 65 66 67// Toggle ShiftLock when pressed together with the other Shift key. 68partial modifier_keys 69xkb_symbols "lshift_both_shiftlock" { 70 key <LFSH> { 71 type[Group1]="TWO_LEVEL", 72 symbols[Group1] = [ Shift_L, Shift_Lock ] 73 }; 74}; 75// Toggle ShiftLock when pressed together with the other Shift key. 76partial modifier_keys 77xkb_symbols "rshift_both_shiftlock" { 78 key <RTSH> { 79 type[Group1]="TWO_LEVEL", 80 symbols[Group1] = [ Shift_R, Shift_Lock ] 81 }; 82}; 83partial modifier_keys 84xkb_symbols "both_shiftlock" { 85 include "shift(lshift_both_shiftlock)" 86 include "shift(rshift_both_shiftlock)" 87}; 88