Skip to content

Instantly share code, notes, and snippets.

@pedrocr
Created May 20, 2021 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrocr/e9fa2e2bc58348b4f4840d928b4dcd53 to your computer and use it in GitHub Desktop.
Save pedrocr/e9fa2e2bc58348b4f4840d928b4dcd53 to your computer and use it in GitHub Desktop.
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