| 1 |
// Eliminate CapsLock, making it another Ctrl. |
| 2 |
partial modifier_keys |
| 3 |
xkb_symbols "nocaps" { |
| 4 |
replace key <CAPS> { [ Control_L ], type[group1] = "ONE_LEVEL" }; |
| 5 |
modifier_map Control { <CAPS> }; |
| 6 |
}; |
| 7 |
|
| 8 |
// Make the left Ctrl key a left Meta. |
| 9 |
xkb_symbols "lctrl_meta" { |
| 10 |
replace key <LCTL> { [ Meta_L ] }; |
| 11 |
modifier_map Mod4 { <LCTL> }; |
| 12 |
}; |
| 13 |
|
| 14 |
// Swap the functions of the CapsLock key and the left Ctrl key. |
| 15 |
partial modifier_keys |
| 16 |
xkb_symbols "swapcaps" { |
| 17 |
replace key <CAPS> { [ Control_L ], type[group1] = "ONE_LEVEL" }; |
| 18 |
replace key <LCTL> { [ Caps_Lock ] }; |
| 19 |
modifier_map Control { <CAPS> }; |
| 20 |
modifier_map Lock { <LCTL> }; |
| 21 |
}; |
| 22 |
|
| 23 |
// Make the left Ctrl key a left Hyper, |
| 24 |
// and the CapsLock key a left Control. |
| 25 |
partial modifier_keys |
| 26 |
xkb_symbols "hyper_capscontrol" { |
| 27 |
replace key <CAPS> { [ Control_L ], type[group1] = "ONE_LEVEL" }; |
| 28 |
replace key <LCTL> { [ Hyper_L ] }; |
| 29 |
modifier_map Control { <CAPS> }; |
| 30 |
modifier_map None { <LCTL> }; |
| 31 |
include "hyper(mod3)" |
| 32 |
}; |
| 33 |
|
| 34 |
// Swap the functions of the CapsLock key and the left Ctrl key. |
| 35 |
// Pressing the left Ctrl key switches to the next group. |
| 36 |
partial modifier_keys |
| 37 |
xkb_symbols "grouptoggle_capscontrol" { |
| 38 |
include "ctrl(swapcaps)" |
| 39 |
include "group(lctrl_toggle)" |
| 40 |
}; |
| 41 |
|
| 42 |
// Move Ctrl to the leftmost key on the middle row and CapsLock to the |
| 43 |
// leftmost key on the bottom row. Only works if the geometry or keycodes |
| 44 |
// file has defined appropriate aliases for the keys in question. |
| 45 |
partial modifier_keys |
| 46 |
xkb_symbols "ac_ctrl" { |
| 47 |
replace key <AC00> { [ Control_L ], type[group1] = "ONE_LEVEL" }; |
| 48 |
replace key <AA00> { [ Caps_Lock ] }; |
| 49 |
modifier_map Control { <AC00> }; |
| 50 |
modifier_map Lock { <AA00> }; |
| 51 |
}; |
| 52 |
|
| 53 |
// Move Ctrl to the leftmost key on the bottom row and CapsLock to the |
| 54 |
// leftmost key on the middle row. Only works if the geometry or keycodes |
| 55 |
// file has defined appropriate aliases for the keys in question. |
| 56 |
partial modifier_keys |
| 57 |
xkb_symbols "aa_ctrl" { |
| 58 |
replace key <AA00> { [ Control_L ] }; |
| 59 |
replace key <AC00> { [ Caps_Lock ] }; |
| 60 |
modifier_map Control { <AA00> }; |
| 61 |
modifier_map Lock { <AC00> }; |
| 62 |
}; |
| 63 |
|
| 64 |
// Right Ctrl functions as another right Alt. |
| 65 |
partial modifier_keys |
| 66 |
xkb_symbols "rctrl_ralt" { |
| 67 |
key <RCTL> { [ Alt_R ] }; |
| 68 |
modifier_map Mod1 { <RCTL> }; |
| 69 |
}; |
| 70 |
|
| 71 |
// Menu key functions as another right Ctrl. |
| 72 |
partial modifier_keys |
| 73 |
xkb_symbols "menu_rctrl" { |
| 74 |
key <MENU> { [ Control_R ] }; |
| 75 |
modifier_map Control { <MENU> }; |
| 76 |
}; |
| 77 |
|
| 78 |
// Right Alt key functions as another right Ctrl. |
| 79 |
partial modifier_keys |
| 80 |
xkb_symbols "ralt_rctrl" { |
| 81 |
replace key <RALT> { [ Control_R, Control_R ], type[group1] = "TWO_LEVEL" }; |
| 82 |
modifier_map Control { <RALT> }; |
| 83 |
}; |
| 84 |
|
| 85 |
// Swap the functions of the left Alt key and the left Ctrl key. |
| 86 |
partial modifier_keys |
| 87 |
xkb_symbols "swap_lalt_lctl" { |
| 88 |
replace key <LALT> { [ Control_L, Control_L ] }; |
| 89 |
replace key <LCTL> { [ Alt_L, Meta_L ] }; |
| 90 |
modifier_map Mod1 { <LCTL> }; |
| 91 |
modifier_map Control { <LALT> }; |
| 92 |
}; |
| 93 |
|
| 94 |
// Swap the functions of the right Alt key and the right Ctrl key. |
| 95 |
partial modifier_keys |
| 96 |
xkb_symbols "swap_ralt_rctl" { |
| 97 |
replace key <RALT> { [ Control_R, Control_R ] }; |
| 98 |
replace key <RCTL> { [ Alt_R, Meta_R ] }; |
| 99 |
modifier_map Mod1 { <RCTL> }; |
| 100 |
modifier_map Control { <RALT> }; |
| 101 |
}; |
| 102 |
|
| 103 |
// Swap the functions of the left Win key and the left Ctrl key. |
| 104 |
partial modifier_keys |
| 105 |
xkb_symbols "swap_lwin_lctl" { |
| 106 |
replace key <LWIN> { [ Control_L ] }; |
| 107 |
replace key <LCTL> { [ Super_L ] }; |
| 108 |
modifier_map Mod4 { <LCTL> }; |
| 109 |
modifier_map Control { <LWIN> }; |
| 110 |
}; |
| 111 |
|
| 112 |
// Swap the functions of the right Win key and the right Ctrl key. |
| 113 |
partial modifier_keys |
| 114 |
xkb_symbols "swap_rwin_rctl" { |
| 115 |
replace key <RWIN> { [ Control_R ] }; |
| 116 |
replace key <RCTL> { [ Super_R ] }; |
| 117 |
modifier_map Mod4 { <RCTL> }; |
| 118 |
modifier_map Control { <RWIN> }; |
| 119 |
}; |
| 120 |
|
| 121 |
// Map Ctrl to the left Alt key, Alt to the left Win key, |
| 122 |
// and Super to the left Ctrl key. |
| 123 |
partial modifier_keys |
| 124 |
xkb_symbols "swap_lalt_lctl_lwin" { |
| 125 |
replace key <LALT> { [ Control_L, Control_L ] }; |
| 126 |
replace key <LWIN> { [ Alt_L, Meta_L ] }; |
| 127 |
replace key <LCTL> { [ Super_L ] }; |
| 128 |
modifier_map Mod1 { <LWIN> }; |
| 129 |
modifier_map Mod4 { <LCTL> }; |
| 130 |
modifier_map Control { <LALT> }; |
| 131 |
}; |