-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fix caps-lock input delay (#757)
- Loading branch information
1 parent
b0703f9
commit dda52b0
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
default hidden partial modifier_keys | ||
xkb_symbols "capslock" { | ||
replace key <CAPS> { [ Caps_Lock ], type[group1] = "ONE_LEVEL" }; | ||
modifier_map Lock { Caps_Lock }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "shiftlock" { | ||
replace key <CAPS> { [ Shift_Lock ], type[group1] = "ONE_LEVEL" }; | ||
modifier_map Shift { Shift_Lock }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "swapescape" { | ||
key <CAPS> { [ Escape ], type[group1] = "ONE_LEVEL" }; | ||
key <ESC> { [ Caps_Lock ] }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "escape" { | ||
key <CAPS> { [ Escape ], type[group1] = "ONE_LEVEL" }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "escape_shifted_capslock" { | ||
key <CAPS> { | ||
type[Group1] = "TWO_LEVEL", | ||
symbols[Group1] = [ Escape, Caps_Lock ], | ||
actions[Group1] = [ NoAction(), LockMods(modifiers = Lock) ] | ||
}; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "escape_shifted_compose" { | ||
key <CAPS> { | ||
type[Group1] = "TWO_LEVEL", | ||
symbols[Group1] = [ Escape, Multi_key ], | ||
actions[Group1] = [ NoAction(), NoAction() ] | ||
}; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "backspace" { | ||
key <CAPS> { [ BackSpace ], type[group1] = "ONE_LEVEL" }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "super" { | ||
key <CAPS> { [ Super_L ], type[group1] = "ONE_LEVEL" }; | ||
modifier_map Mod4 { <CAPS> }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "hyper" { | ||
key <CAPS> { [ Hyper_L ], type[group1] = "ONE_LEVEL" }; | ||
modifier_map Mod4 { <CAPS> }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "menu" { | ||
key <CAPS> { [ Menu ], type[group1] = "ONE_LEVEL" }; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "numlock" { | ||
key <CAPS> { [ Num_Lock ], type[group1] = "ONE_LEVEL" }; | ||
}; | ||
|
||
// This changes the <CAPS> key to become a Control modifier, | ||
// but it will still produce the Caps_Lock keysym. | ||
hidden partial modifier_keys | ||
xkb_symbols "ctrl_modifier" { | ||
key <CAPS> { | ||
type="ALPHABETIC", | ||
repeat=No, | ||
symbols[Group1]= [ Caps_Lock, Caps_Lock ], | ||
actions[Group1]= [ LockMods(modifiers=Lock), | ||
LockMods(modifiers=Shift+Lock,affect=unlock) ] | ||
}; | ||
}; | ||
|
||
hidden partial modifier_keys | ||
xkb_symbols "none" { | ||
key <CAPS> { [ VoidSymbol ], type[group1] = "ONE_LEVEL" }; | ||
}; |