Skip to content

Commit cdc6ce5

Browse files
fiftydinarKyleGospo
andcommitted
feat(gnome): Fix caps-lock input delay (#630)
* feat: Fix caps-lock input delay This is one of the 1st issues which ex-Windows users notice when they switch to Linux. I am one of those users who uses Caps-Lock instead of Shift for uppercase letters. This will get rid of input delay, while the "light indicator" delay is still the same (I mentioned this distinction to not confuse you if you don't "see" any changes). To test, type "Helo" repeatedly using Caps Lock. You will no longer see "HElo" in your texts. Fix took from here: https://forum.manjaro.org/t/caps-lock-behaviour-wayland/79868/8 * Add needed dconf for caps-lock delay fix * Place this in desktop/silverblue, since it is for Gnome only for now --------- Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
1 parent b94e3c0 commit cdc6ce5

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

system_files/desktop/silverblue/usr/etc/dconf/db/local.d/02-bazzite-global

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ switch-applications-backward=['<Shift><Super>Tab']
44
switch-windows=['<Alt>Tab']
55
switch-windows-backward=['<Shift><Alt>Tab']
66

7+
[org/gnome/desktop/input-sources]
8+
xkb-options=['caps:ctrl_modifier']
9+
710
[org/gnome/desktop/peripherals/keyboard]
811
numlock-state=true
912

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
default hidden partial modifier_keys
2+
xkb_symbols "capslock" {
3+
replace key <CAPS> { [ Caps_Lock ], type[group1] = "ONE_LEVEL" };
4+
modifier_map Lock { Caps_Lock };
5+
};
6+
7+
hidden partial modifier_keys
8+
xkb_symbols "shiftlock" {
9+
replace key <CAPS> { [ Shift_Lock ], type[group1] = "ONE_LEVEL" };
10+
modifier_map Shift { Shift_Lock };
11+
};
12+
13+
hidden partial modifier_keys
14+
xkb_symbols "swapescape" {
15+
key <CAPS> { [ Escape ], type[group1] = "ONE_LEVEL" };
16+
key <ESC> { [ Caps_Lock ] };
17+
};
18+
19+
hidden partial modifier_keys
20+
xkb_symbols "escape" {
21+
key <CAPS> { [ Escape ], type[group1] = "ONE_LEVEL" };
22+
};
23+
24+
hidden partial modifier_keys
25+
xkb_symbols "escape_shifted_capslock" {
26+
key <CAPS> {
27+
type[Group1] = "TWO_LEVEL",
28+
symbols[Group1] = [ Escape, Caps_Lock ],
29+
actions[Group1] = [ NoAction(), LockMods(modifiers = Lock) ]
30+
};
31+
};
32+
33+
hidden partial modifier_keys
34+
xkb_symbols "escape_shifted_compose" {
35+
key <CAPS> {
36+
type[Group1] = "TWO_LEVEL",
37+
symbols[Group1] = [ Escape, Multi_key ],
38+
actions[Group1] = [ NoAction(), NoAction() ]
39+
};
40+
};
41+
42+
hidden partial modifier_keys
43+
xkb_symbols "backspace" {
44+
key <CAPS> { [ BackSpace ], type[group1] = "ONE_LEVEL" };
45+
};
46+
47+
hidden partial modifier_keys
48+
xkb_symbols "super" {
49+
key <CAPS> { [ Super_L ], type[group1] = "ONE_LEVEL" };
50+
modifier_map Mod4 { <CAPS> };
51+
};
52+
53+
hidden partial modifier_keys
54+
xkb_symbols "hyper" {
55+
key <CAPS> { [ Hyper_L ], type[group1] = "ONE_LEVEL" };
56+
modifier_map Mod4 { <CAPS> };
57+
};
58+
59+
hidden partial modifier_keys
60+
xkb_symbols "menu" {
61+
key <CAPS> { [ Menu ], type[group1] = "ONE_LEVEL" };
62+
};
63+
64+
hidden partial modifier_keys
65+
xkb_symbols "numlock" {
66+
key <CAPS> { [ Num_Lock ], type[group1] = "ONE_LEVEL" };
67+
};
68+
69+
// This changes the <CAPS> key to become a Control modifier,
70+
// but it will still produce the Caps_Lock keysym.
71+
hidden partial modifier_keys
72+
xkb_symbols "ctrl_modifier" {
73+
key <CAPS> {
74+
type="ALPHABETIC",
75+
repeat=No,
76+
symbols[Group1]= [ Caps_Lock, Caps_Lock ],
77+
actions[Group1]= [ LockMods(modifiers=Lock),
78+
LockMods(modifiers=Shift+Lock,affect=unlock) ]
79+
};
80+
};
81+
82+
hidden partial modifier_keys
83+
xkb_symbols "none" {
84+
key <CAPS> { [ VoidSymbol ], type[group1] = "ONE_LEVEL" };
85+
};

0 commit comments

Comments
 (0)