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