Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom xkb map to remap CAPS in sway
In your .config/sway/config:
input * xkb_layout pt-custom
In .xkb/symbols/pt-custom:
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
include "pt"
name[Group1] = "Portuguese (Custom)";
# Make CapsLock Mod4 and Windows key Mod5
key <CAPS> { [ Hyper_L ] };
modifier_map Mod4 { Hyper_L };
key <LWIN> { [ Super_L ] };
modifier_map Mod5 { Super_L };
Instead of include "pt" just include whatever keyboard layout you do use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment