1 // Eliminate CapsLock, making it another Ctrl. 2 partial modifier_keys 3 xkb_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. 9 xkb_symbols "lctrl_meta" { 10 replace key <LCTL> { [ Meta_L ] }; 11 }; 12 13 // Swap the functions of the CapsLock key and the left Ctrl key. 14 partial modifier_keys 15 xkb_symbols "swapcaps" { 16 replace key <CAPS> { [ Control_L ] }; 17 replace key <LCTL> { [ Caps_Lock ] }; 18 }; 19 20 // Move Ctrl to the leftmost key on the middle row and CapsLock to the 21 // leftmost key on the bottom row. Only works if the geometry or keycodes 22 // file has defined appropriate aliases for the keys in question. 23 partial modifier_keys 24 xkb_symbols "ac_ctrl" { 25 replace key <AC00> { [ Control_L ] }; 26 replace key <AA00> { [ Caps_Lock ] }; 27 }; 28 29 // Move Ctrl to the leftmost key on the bottom row and CapsLock to the 30 // leftmost key on the middle row. Only works if the geometry or keycodes 31 // file has defined appropriate aliases for the keys in question. 32 partial modifier_keys 33 xkb_symbols "aa_ctrl" { 34 replace key <AA00> { [ Control_L ] }; 35 replace key <AC00> { [ Caps_Lock ] }; 36 }; 37 38 // Right Ctrl key functions as another right Alt. 39 partial modifier_keys 40 xkb_symbols "rctrl_ralt" { 41 key <RCTL> { symbols[Group1]= [ Alt_R ] }; 42 }; 43 44 // Menu key functions as another right Ctrl. 45 partial modifier_keys 46 xkb_symbols "menu_rctrl" { 47 replace key <MENU> { [ Control_R, Control_R ] }; 48 modifier_map Control { Control_L, <MENU> }; 49 }; 50 51 // Right Alt key functions as another right Ctrl. 52 partial modifier_keys 53 xkb_symbols "ralt_rctrl" { 54 replace key <RALT> { type[Group1] = "TWO_LEVEL", 55 symbols[Group1] = [ Control_R, Control_R ] }; 56 modifier_map Control { <RALT> }; 57 }; 58 59 // Swap the functions of the left Alt key and the left Ctrl key. 60 partial modifier_keys 61 xkb_symbols "swap_lalt_lctl" { 62 replace key <LALT> { [ Control_L, Control_L ] }; 63 replace key <LCTL> { [ Alt_L, Meta_L ] }; 64 }; 65 66 // Swap the functions of the left Win key and the left Ctrl key. 67 partial modifier_keys 68 xkb_symbols "swap_lwin_lctl" { 69 replace key <LWIN> { [ Control_L ] }; 70 replace key <LCTL> { [ Super_L ] }; 71 }; 72 73 // Swap the functions of the right Win key and the right Ctrl key. 74 partial modifier_keys 75 xkb_symbols "swap_rwin_rctl" { 76 replace key <RWIN> { [ Control_R ] }; 77 replace key <RCTL> { [ Super_R ] }; 78 }; 79 80 // Map Ctrl to the left Alt key, Alt to the left Win key, 81 // and Super to the left Ctrl key. 82 partial modifier_keys 83 xkb_symbols "swap_lalt_lctl_lwin" { 84 replace key <LALT> { [ Control_L, Control_L ] }; 85 replace key <LWIN> { [ Alt_L, Meta_L ] }; 86 replace key <LCTL> { [ Super_L ] }; 87 }; 88