1// Meta is mapped to second level of Alt keys. 2partial modifier_keys 3xkb_symbols "meta_alt" { 4 key <LALT> { [ Alt_L, Meta_L ] }; 5 key <RALT> { type[Group1] = "TWO_LEVEL", 6 symbols[Group1] = [ Alt_R, Meta_R ] }; 7 modifier_map Mod1 { Alt_L, Alt_R, Meta_L, Meta_R }; 8// modifier_map Mod4 {}; 9}; 10 11// Alt is mapped to the Win keys (and the usual Alt keys). 12partial modifier_keys 13xkb_symbols "alt_win" { 14 key <LWIN> { [ Alt_L ] }; 15 key <RWIN> { [ Alt_R ] }; 16 modifier_map Mod1 { <LWIN>, <RWIN> }; 17}; 18 19// Ctrl is mapped to the Win keys (and the usual Ctrl keys). 20partial modifier_keys 21xkb_symbols "ctrl_win" { 22 key <LWIN> { [ Control_L ] }; 23 key <RWIN> { [ Control_R ] }; 24 modifier_map Control { <LWIN>, <RWIN> }; 25}; 26 27// Ctrl is mapped to the Alt keys, Alt to the Win keys, and Win to the Ctrl keys. 28partial modifier_keys 29xkb_symbols "ctrl_alt_win" { 30 key <LALT> { [ Control_L, Control_L ] }; 31 key <RALT> { type[Group1] = "TWO_LEVEL", 32 symbols[Group1] = [ Control_R, Control_R ] }; 33 key <LWIN> { [ Alt_L, Meta_L ] }; 34 key <RWIN> { [ Alt_R, Meta_R ] }; 35 key <LCTL> { [ Super_L ] }; 36 key <RCTL> { [ Super_R ] }; 37 modifier_map Control { <RALT>, <LALT> }; 38 modifier_map Mod1 { <LWIN>, <RWIN> }; 39 modifier_map Mod4 { <LCTL>, <RCTL> }; 40}; 41 42// Meta is mapped to the Win keys. 43partial modifier_keys 44xkb_symbols "meta_win" { 45 key <LALT> { [ Alt_L, Alt_L ] }; 46 key <RALT> { type[Group1] = "TWO_LEVEL", 47 symbols[Group1] = [ Alt_R, Alt_R ] }; 48 key <LWIN> { [ Meta_L ] }; 49 key <RWIN> { [ Meta_R ] }; 50 modifier_map Mod1 { Alt_L, Alt_R }; 51 modifier_map Mod4 { <META>, Meta_L, Meta_R }; 52}; 53 54// Meta is mapped to the left Win key. 55partial modifier_keys 56xkb_symbols "left_meta_win" { 57 key <LALT> { [ Alt_L, Alt_L ] }; 58 key <LWIN> { [ Meta_L ] }; 59 modifier_map Mod1 { Alt_L }; 60 modifier_map Mod4 { <META>, Meta_L }; 61}; 62 63// Hyper is mapped to the Win keys. 64partial modifier_keys 65xkb_symbols "hyper_win" { 66 key <LWIN> { [ Hyper_L ] }; 67 key <RWIN> { [ Hyper_R ] }; 68 modifier_map Mod4 { Hyper_L, Hyper_R }; 69}; 70 71// Menu is mapped to the Menu key. 72partial modifier_keys 73xkb_symbols "menu" { 74 key <MENU> { [ Menu ] }; 75}; 76 77// Layout for Tux key caps with additional right Alt key 78partial modifier_keys 79xkb_symbols "alt_super_win" { 80 key <LALT> { [ Alt_L, Meta_L ] }; 81 key <RWIN> { [ Alt_R, Meta_R ] }; 82 key <LWIN> { [ Super_L ]}; 83 key <MENU> { [ Super_R ] }; 84 modifier_map Mod1 { Alt_L, Alt_R, Meta_L, Meta_R }; 85 modifier_map Mod4 { Super_L, Super_R }; 86}; 87 88// Swap the Alt and Win keys. 89partial modifier_keys 90xkb_symbols "swap_alt_win" { 91 include "altwin(swap_lalt_lwin)" 92 include "altwin(swap_ralt_rwin)" 93}; 94 95// Swap the left Alt and Win keys. 96hidden partial modifier_keys 97xkb_symbols "swap_lalt_lwin" { 98 key <LALT> { type[Group1] = "ONE_LEVEL", 99 symbols[Group1] = [ Super_L ] }; 100 key <LWIN> { [ Alt_L, Meta_L ] }; 101}; 102 103// Swap the right Alt and Win keys. 104hidden partial modifier_keys 105xkb_symbols "swap_ralt_rwin" { 106 key <RALT> { type[Group1] = "ONE_LEVEL", 107 symbols[Group1] = [ Super_R ] }; 108 key <RWIN> { [ Alt_R, Meta_R ] }; 109}; 110