1// Meta is mapped to second level of Alt. 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 Super and the usual Alt. 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 Super 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, Alt to the Super, 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 Super. 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 Super. 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// Menu is mapped to the right Win key. 78partial modifier_keys 79xkb_symbols "menu_win" { 80 key <MENU> { [ Super_R ] }; 81}; 82 83// Layout for Tux key caps with additional right Alt key 84partial modifier_keys 85xkb_symbols "alt_super_win" { 86 key <LALT> { [ Alt_L, Meta_L ] }; 87 key <RWIN> { [ Alt_R, Meta_R ] }; 88 key <LWIN> { [ Super_L ]}; 89 key <MENU> { [ Super_R ] }; 90 modifier_map Mod1 { Alt_L, Alt_R, Meta_L, Meta_R }; 91 modifier_map Mod4 { Super_L, Super_R }; 92}; 93 94// Swap the Alt and Super. 95partial modifier_keys 96xkb_symbols "swap_alt_win" { 97 include "altwin(swap_lalt_lwin)" 98 include "altwin(swap_ralt_rwin)" 99}; 100 101// Swap the left Alt and Super. 102partial modifier_keys 103xkb_symbols "swap_lalt_lwin" { 104 key <LALT> { type[Group1] = "ONE_LEVEL", 105 symbols[Group1] = [ Super_L ] }; 106 key <LWIN> { [ Alt_L, Meta_L ] }; 107}; 108 109// Swap the right Alt and Super. 110hidden partial modifier_keys 111xkb_symbols "swap_ralt_rwin" { 112 key <RALT> { type[Group1] = "ONE_LEVEL", 113 symbols[Group1] = [ Super_R ] }; 114 key <RWIN> { [ Alt_R, Meta_R ] }; 115}; 116 117// Win is mapped to the PrtSc key (and the usual Win key). 118partial modifier_keys 119xkb_symbols "prtsc_rwin" { 120 replace key <PRSC> { [ Super_R, Super_R ] }; 121 modifier_map Mod4 { <PRSC>, <RWIN> }; 122}; 123