X-Git-Url: https://gitweb.michael.orlitzky.com/?p=emacs-keys.git;a=blobdiff_plain;f=src%2Fxkb%2Fsymbols%2Femacs-keys;fp=src%2Fxkb%2Fsymbols%2Femacs-keys;h=3b9c532f398ab4f80982516882cd57213fb7fa51;hp=0000000000000000000000000000000000000000;hb=4b181b8125593f0cc3f80f63f1d269806c74295d;hpb=6e0d445832f65e722b639bb4afc86ebeb3421efb diff --git a/src/xkb/symbols/emacs-keys b/src/xkb/symbols/emacs-keys new file mode 100644 index 0000000..3b9c532 --- /dev/null +++ b/src/xkb/symbols/emacs-keys @@ -0,0 +1,39 @@ +// +// The emacs-keys layout is a modified "us" layout: +// +// * CapsLock becomes Left-Alt +// * Left-Alt and Left-Ctrl are swapped +// * Right-Alt and Right-Ctrl are swapped +// +// This could probably be pieced together from various +// rules that ship with xkeyboard-config, but it's a +// lot nicer to have everything available as a layout. +// + +default partial alphanumeric_keys +xkb_symbols "emacs-keys" { + include "us(basic)" + name[Group1] = "Emacs Keys"; + + // Make capslock a left-alt. + replace key { [ Alt_L, Meta_L ] }; + modifier_map Mod1 { }; + + // This is a copy of the ctrl(swap_lalt_lctl) rule + // that ships with xkeyboard-config. + replace key { [ Control_L, Control_L ] }; + replace key { [ Alt_L, Meta_L ] }; + modifier_map Mod1 { }; + modifier_map Control { }; + replace key { [ Control_L, Control_L ] }; + replace key { [ Alt_L, Meta_L ] }; + modifier_map Mod1 { }; + modifier_map Control { }; + + // This is a copy of the ctrl(swap_ralt_rctl) rule + // that ships with xkeyboard-config. + replace key { [ Control_R, Control_R ] }; + replace key { [ Alt_R, Meta_R ] }; + modifier_map Mod1 { }; + modifier_map Control { }; +};