Debian Codegraph @

symbols/shift

raw
1 // Cancel CapsLock when a Shift key is pressed.
2 //
3 // The usual workflow expected with this option is:
4 // - `<CapsLock>` ↓↑: `Caps` is locked
5 // - type caps letters
6 // - `<Shift>` ↓: `Caps` is unlocked, `Shift` is set
7 // - optionally type some more upper case letters: tolerance to sync with `Shift`
8 // - `<Shift>` ↑: `Shift` is unset
9 // - type in lower case
10 //
11 // A side effect is that both `<Shift>` keys together trigger CapsLock.
12 partial modifier_keys
13 xkb_symbols "breaks_caps" {
14 include "shift(both_capslock_cancel)"
15 };
16
17
18 // Toggle CapsLock when pressed together with the other Shift key.
19 partial modifier_keys
20 xkb_symbols "lshift_both_capslock" {
21 key <LFSH> {[ Shift_L, Caps_Lock ], type[group1]="TWO_LEVEL" };
22 };
23
24 // Toggle CapsLock when pressed together with the other Shift key.
25 partial modifier_keys
26 xkb_symbols "rshift_both_capslock" {
27 key <RTSH> {[ Shift_R, Caps_Lock ], type[group1]="TWO_LEVEL" };
28 };
29 partial modifier_keys
30 xkb_symbols "both_capslock" {
31 include "shift(lshift_both_capslock)"
32 include "shift(rshift_both_capslock)"
33 };
34
35
36 // Set CapsLock when pressed with the other Shift key, release it when pressed alone.
37 partial modifier_keys
38 xkb_symbols "lshift_both_capslock_cancel" {
39 key <LFSH> {[ Shift_L, Caps_Lock ], type[group1]="ALPHABETIC" };
40 };
41
42 // Set CapsLock when pressed with the other Shift key, release it when pressed alone.
43 partial modifier_keys
44 xkb_symbols "rshift_both_capslock_cancel" {
45 key <RTSH> {[ Shift_R, Caps_Lock ], type[group1]="ALPHABETIC" };
46 };
47
48 partial modifier_keys
49 xkb_symbols "both_capslock_cancel" {
50 include "shift(lshift_both_capslock_cancel)"
51 include "shift(rshift_both_capslock_cancel)"
52 };
53
54
55 // Toggle ShiftLock when pressed together with the other Shift key.
56 partial modifier_keys
57 xkb_symbols "lshift_both_shiftlock" {
58 key <LFSH> {[ Shift_L, Shift_Lock ], type[group1]="TWO_LEVEL" };
59 };
60
61 // Toggle ShiftLock when pressed together with the other Shift key.
62 partial modifier_keys
63 xkb_symbols "rshift_both_shiftlock" {
64 key <RTSH> {[ Shift_R, Shift_Lock ], type[group1]="TWO_LEVEL" };
65 };
66
67 partial modifier_keys
68 xkb_symbols "both_shiftlock" {
69 include "shift(lshift_both_shiftlock)"
70 include "shift(rshift_both_shiftlock)"
71 };