Key map
As a US Dvorak typist that sometimes types Swedish, I have opinions about key maps. Since I used xmodmap before to customize my key map to make it work for me, I needed to replicate this for Sway.
It took some tinkering, but I've ended up with the following custom key map:
// This file defines my own custom keymap. More information about // which parts that gets included are available in the different // subfolders in: /usr/share/X11/xkb/ xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "default" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us(dvorak)+inet(evdev)+ctrl(nocaps)+eurosign(e)+kpdl(dot)" // Less than/Greater than/Pipe key on Swedish keyboards becomes Compose replace key <LSGT> { [ Multi_key ] }; // Scroll Lock becomes Compose replace key <SCLK> { [ Multi_key ] }; }; xkb_geometry { include "pc(pc105)" }; };
I put that as a file somewhere, and then I have the following in my sway configuration:
input "type:keyboard" {
xkb_file /path/to/xkb/file
}