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