Skip to content

custom-types

Files / keyboard-layout / custom-types

Files in keyboard-layout/

DownloadRawXKB · 51 lines · 2.9 KB

From Dvorak with QWERTY's brackets on KDE Plasma (Wayland). MIT licence: LICENSE.

keyboard-layout/custom-types
// Key types for the dvorak-qwerty layout: Dvorak on levels 1 and 2, QWERTY on
// levels 3 and 4 while Ctrl or Meta (Mod4) is held. Ctrl and Meta stay set
// (preserve), so apps see Ctrl+C, not a plain c. Lock only matters without them.
// Loaded by the XKB option custom:types. Installed copy: /etc/xkb/types/custom.
default xkb_types "dvq" {
// A key whose Dvorak symbol is a letter: Caps Lock gives the capital.
type "DVQ_ALPHA" {
modifiers = Shift + Lock + Control + Mod4;
map[Shift] = Level2;
map[Lock] = Level2;
map[Control] = Level3; preserve[Control] = Control;
map[Control+Lock] = Level3; preserve[Control+Lock] = Control;
map[Control+Shift] = Level4; preserve[Control+Shift] = Control;
map[Control+Shift+Lock] = Level4; preserve[Control+Shift+Lock] = Control;
map[Mod4] = Level3; preserve[Mod4] = Mod4;
map[Mod4+Lock] = Level3; preserve[Mod4+Lock] = Mod4;
map[Mod4+Shift] = Level4; preserve[Mod4+Shift] = Mod4;
map[Mod4+Shift+Lock] = Level4; preserve[Mod4+Shift+Lock] = Mod4;
map[Control+Mod4] = Level3; preserve[Control+Mod4] = Control+Mod4;
map[Control+Mod4+Lock] = Level3; preserve[Control+Mod4+Lock] = Control+Mod4;
map[Control+Mod4+Shift] = Level4; preserve[Control+Mod4+Shift] = Control+Mod4;
map[Control+Mod4+Shift+Lock] = Level4; preserve[Control+Mod4+Shift+Lock] = Control+Mod4;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "QWERTY";
level_name[Level4] = "QWERTY Shift";
};
// A key whose Dvorak symbol is punctuation: Caps Lock does nothing.
type "DVQ_PUNCT" {
modifiers = Shift + Lock + Control + Mod4;
map[Shift] = Level2;
map[Shift+Lock] = Level2;
map[Control] = Level3; preserve[Control] = Control;
map[Control+Lock] = Level3; preserve[Control+Lock] = Control;
map[Control+Shift] = Level4; preserve[Control+Shift] = Control;
map[Control+Shift+Lock] = Level4; preserve[Control+Shift+Lock] = Control;
map[Mod4] = Level3; preserve[Mod4] = Mod4;
map[Mod4+Lock] = Level3; preserve[Mod4+Lock] = Mod4;
map[Mod4+Shift] = Level4; preserve[Mod4+Shift] = Mod4;
map[Mod4+Shift+Lock] = Level4; preserve[Mod4+Shift+Lock] = Mod4;
map[Control+Mod4] = Level3; preserve[Control+Mod4] = Control+Mod4;
map[Control+Mod4+Lock] = Level3; preserve[Control+Mod4+Lock] = Control+Mod4;
map[Control+Mod4+Shift] = Level4; preserve[Control+Mod4+Shift] = Control+Mod4;
map[Control+Mod4+Shift+Lock] = Level4; preserve[Control+Mod4+Shift+Lock] = Control+Mod4;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] = "QWERTY";
level_name[Level4] = "QWERTY Shift";
};
};

Text, photos and drawings: CC BY 4.0. Code: MIT. Share and adapt them, crediting HomeLab Guides (blog.jacq.cc). Licence and privacy