]> gitweb.michael.orlitzky.com - emacs-keys.git/blob - src/xkb/symbols/emacs-keys
src/xkb/symbols/emacs-keys: new xkb layout file
[emacs-keys.git] / src / xkb / symbols / emacs-keys
1 //
2 // The emacs-keys layout is a modified "us" layout:
3 //
4 // * CapsLock becomes Left-Alt
5 // * Left-Alt and Left-Ctrl are swapped
6 // * Right-Alt and Right-Ctrl are swapped
7 //
8 // This could probably be pieced together from various
9 // rules that ship with xkeyboard-config, but it's a
10 // lot nicer to have everything available as a layout.
11 //
12
13 default partial alphanumeric_keys
14 xkb_symbols "emacs-keys" {
15 include "us(basic)"
16 name[Group1] = "Emacs Keys";
17
18 // Make capslock a left-alt.
19 replace key <CAPS> { [ Alt_L, Meta_L ] };
20 modifier_map Mod1 { <CAPS> };
21
22 // This is a copy of the ctrl(swap_lalt_lctl) rule
23 // that ships with xkeyboard-config.
24 replace key <LALT> { [ Control_L, Control_L ] };
25 replace key <LCTL> { [ Alt_L, Meta_L ] };
26 modifier_map Mod1 { <LCTL> };
27 modifier_map Control { <LALT> };
28 replace key <LALT> { [ Control_L, Control_L ] };
29 replace key <LCTL> { [ Alt_L, Meta_L ] };
30 modifier_map Mod1 { <LCTL> };
31 modifier_map Control { <LALT> };
32
33 // This is a copy of the ctrl(swap_ralt_rctl) rule
34 // that ships with xkeyboard-config.
35 replace key <RALT> { [ Control_R, Control_R ] };
36 replace key <RCTL> { [ Alt_R, Meta_R ] };
37 modifier_map Mod1 { <RCTL> };
38 modifier_map Control { <RALT> };
39 };