diff --git a/usr/etc/dconf/db/local.d/01-ublue b/usr/etc/dconf/db/local.d/01-ublue index 8cb3ac90d98..0ef2482f4f1 100644 --- a/usr/etc/dconf/db/local.d/01-ublue +++ b/usr/etc/dconf/db/local.d/01-ublue @@ -23,6 +23,9 @@ picture-options='zoom' primary-color='000000' secondary-color='FFFFFF' +[org/gnome/desktop/input-sources] +xkb-options=['caps:ctrl_modifier'] + [org/gnome/desktop/interface] enable-hot-corners=false clock-show-weekday=true diff --git a/usr/share/X11/xkb/symbols/capslock b/usr/share/X11/xkb/symbols/capslock new file mode 100644 index 00000000000..6bb0fbc2a47 --- /dev/null +++ b/usr/share/X11/xkb/symbols/capslock @@ -0,0 +1,85 @@ +default hidden partial modifier_keys +xkb_symbols "capslock" { + replace key { [ Caps_Lock ], type[group1] = "ONE_LEVEL" }; + modifier_map Lock { Caps_Lock }; +}; + +hidden partial modifier_keys +xkb_symbols "shiftlock" { + replace key { [ Shift_Lock ], type[group1] = "ONE_LEVEL" }; + modifier_map Shift { Shift_Lock }; +}; + +hidden partial modifier_keys +xkb_symbols "swapescape" { + key { [ Escape ], type[group1] = "ONE_LEVEL" }; + key { [ Caps_Lock ] }; +}; + +hidden partial modifier_keys +xkb_symbols "escape" { + key { [ Escape ], type[group1] = "ONE_LEVEL" }; +}; + +hidden partial modifier_keys +xkb_symbols "escape_shifted_capslock" { + key { + 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 { + type[Group1] = "TWO_LEVEL", + symbols[Group1] = [ Escape, Multi_key ], + actions[Group1] = [ NoAction(), NoAction() ] + }; +}; + +hidden partial modifier_keys +xkb_symbols "backspace" { + key { [ BackSpace ], type[group1] = "ONE_LEVEL" }; +}; + +hidden partial modifier_keys +xkb_symbols "super" { + key { [ Super_L ], type[group1] = "ONE_LEVEL" }; + modifier_map Mod4 { }; +}; + +hidden partial modifier_keys +xkb_symbols "hyper" { + key { [ Hyper_L ], type[group1] = "ONE_LEVEL" }; + modifier_map Mod4 { }; +}; + +hidden partial modifier_keys +xkb_symbols "menu" { + key { [ Menu ], type[group1] = "ONE_LEVEL" }; +}; + +hidden partial modifier_keys +xkb_symbols "numlock" { + key { [ Num_Lock ], type[group1] = "ONE_LEVEL" }; +}; + +// This changes the key to become a Control modifier, +// but it will still produce the Caps_Lock keysym. +hidden partial modifier_keys +xkb_symbols "ctrl_modifier" { + key { + 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 { [ VoidSymbol ], type[group1] = "ONE_LEVEL" }; +};