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