diff --git a/.xkb/symbols/mac_gui b/.xkb/symbols/mac_gui index 005649b..9ca87a5 100644 --- a/.xkb/symbols/mac_gui +++ b/.xkb/symbols/mac_gui @@ -1,40 +1,147 @@ +// Template +// replace key { +// type[Group1]= "ONE_LEVEL_CTRL", +// symbols[Group1]= [ +// Base, +// Alt, +// Shift Alt, +// Control, +// Shift Control, +// Super, +// Shift Super, +// Control Alt, +// Super Control", +// Super Alt, +// Super Control Alt +// ], +// actions[Group1]= [ +// NoAction(), +// RedirectKey(key=,modifiers=NewMod,clearmods=Mod1), +// RedirectKey(key=,modifiers=NewMod,clearmods=Mod1+Shift), +// RedirectKey(key=,modifiers=NewMod,clearmods=Control), +// RedirectKey(key=,modifiers=NewMod,clearmods=Control+Shift), +// RedirectKey(key=,modifiers=NewMod,clearmods=Super), +// RedirectKey(key=,modifiers=NewMod,clearmods=Super+Shift), +// RedirectKey(key=,modifiers=NewMod,clearmods=Control+Alt), +// RedirectKey(key=,modifiers=NewMod,clearmods=Super+Control), +// RedirectKey(key=,modifiers=NewMod,clearmods=Super+Mod1), +// RedirectKey(key=,modifiers=NewMod,clearmods=Control+Mod1) +// ] +// }; default partial xkb_symbols "mac_levelssym" { + // Fix the G key for Sublime Text + replace key { + type[Group1]= "ONE_LEVEL_CTRL", + symbols[Group1]= [ + g, + G, + g, + G, + g, + G, + NoSymbol, + NoSymbol, + g, + g, + g, + g + ], + actions[Group1]= [ + NoAction(), + NoAction(), + // Pass G Normally + RedirectKey(key=), + RedirectKey(key=), + // Find Next + RedirectKey(key=,clearmods=Control), + // Find Previous + RedirectKey(key=,clearmods=Control), + // Sublime Goto Line + RedirectKey(key=,modifiers=Control,clearmods=Super), + NoAction(), + // Sublime Quick Find + RedirectKey(key=,clearmods=Mod1), + // Sublime Select All Matches + RedirectKey(key=,modifiers=Mod1,clearmods=Super+Control), + NoAction(), + NoAction() + ] + }; // LEFT to Begin Line or Beginning of word replace key { type[Group1]= "ONE_LEVEL_CTRL", - symbols[Group1]= [ Left, Left, NoSymbol,NoSymbol,Left ], + symbols[Group1]= [ + Left, + Left, + Left, + Left, + NoSymbol, + NoSymbol, + Left + ], actions[Group1]= [ NoAction(), - RedirectKey(key=,modifiers=Control,clearmods=Mod1), + NoAction(), + // Wordwise + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=,clearmods=Mod1), RedirectKey(key=,clearmods=Control), - RedirectKey(key=,modifiers=Shift,clearmods=Control+Mod1), - RedirectKey(key=,modifiers=Shift+Control,clearmods=Mod1) + RedirectKey(key=,clearmods=Control), + // Change workspace + NoAction(), + // Wordwise - Sublime? + RedirectKey(key=,modifiers=Mod1,clearmods=Super) ] }; // Right to End of Line or end of word replace key { type[Group1]= "ONE_LEVEL_CTRL", - symbols[Group1]= [ Right, Right, NoSymbol, NoSymbol,Right ], + symbols[Group1]= [ + Right, + Right, + Right, + Right, + NoSymbol, + NoSymbol, + Right + ], actions[Group1]= [ NoAction(), - RedirectKey(key=,modifiers=Control,clearmods=Mod1), + NoAction(), + // Wordwise + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=,clearmods=Mod1), RedirectKey(key=,clearmods=Control), - RedirectKey(key=,modifiers=Shift,clearmods=Control+Mod1), - RedirectKey(key=,modifiers=Shift+Control,clearmods=Mod1) + RedirectKey(key=,clearmods=Control), + // Change workspace + NoAction(), + // Wordwise - Sublime? + RedirectKey(key=,modifiers=Mod1,clearmods=Super) ] }; - // Up to Mac Home + //Up to Mac Home replace key { type[Group1]= "ONE_LEVEL_CTRL", symbols[Group1]= [ Up, Up, - NoSymbol + Up, + Up, + NoSymbol, + NoSymbol, + Up ], actions[Group1]= [ NoAction(), NoAction(), - RedirectKey(key=) + // Wordwise + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=), + RedirectKey(key=), + // Wordwise - Sublime? + RedirectKey(key=,clearmods=Super), + RedirectKey(key=,modifiers=Mod1,clearmods=Super) ] }; // Down to Mac End @@ -43,28 +150,67 @@ default partial xkb_symbols "mac_levelssym" { symbols[Group1]= [ Down, Down, - NoSymbol + Down, + Down, + NoSymbol, + NoSymbol, + Down ], actions[Group1]= [ NoAction(), NoAction(), - RedirectKey(key=) + // Wordwise + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=), + RedirectKey(key=), + // Wordwise - Sublime? + RedirectKey(key=,clearmods=Super), + RedirectKey(key=,modifiers=Mod1,clearmods=Super) ] }; // Alt BKSP to DELETE replace key { - type[Group1]= "ONE_LEVEL_CTRL", - symbols[Group1]= [ - BackSpace, - BackSpace, - NoSymbol - ], - actions[Group1]= [ - NoAction(), - RedirectKey(key=,clearmods=Mod1), - NoAction() - ] + type[Group1]= "ONE_LEVEL_CTRL", + symbols[Group1]= [ + BackSpace, + BackSpace, + BackSpace + ], + actions[Group1]= [ + NoAction(), + NoAction(), + RedirectKey(key=,clearmods=Mod1) + ] }; + // Cycle App and In App Tab Switching + replace key { + type[Group1]= "ONE_LEVEL_CTRL", + symbols[Group1]= [ + Tab, + Tab, + NoSymbol, + NoSymbol, + slash, + slash, + Tab, + Tab + ], + actions[Group1]= [ + NoAction(), + NoAction(), + // FK18 is just to clear Alt + RedirectKey(key=,clearmods=Mod1), + RedirectKey(key=,clearmods=Mod1), + // Also need to remap on the DE level + // to backslash \ for Cmd+Tab + RedirectKey(key=), + RedirectKey(key=), + RedirectKey(key=,modifiers=Control,clearmods=Mod4), + RedirectKey(key=,modifiers=Control+Shift,clearmods=Mod4) + ] + }; + // // Full Print Screen // // GalliumOS // replace key { @@ -101,11 +247,15 @@ partial xkb_symbols "mac_chrome" { symbols[Group1]= [ Left, Left, + NoSymbol, + NoSymbol, Left ], actions[Group1]= [ NoAction(), - RedirectKey(key=), + NoAction(), + RedirectKey(key=), + RedirectKey(key=), RedirectKey(key=,modifiers=Mod1,clearmods=Control) ] }; @@ -115,11 +265,15 @@ partial xkb_symbols "mac_chrome" { symbols[Group1]= [ Right, Right, + NoSymbol, + NoSymbol, Right ], actions[Group1]= [ NoAction(), - RedirectKey(key=), + NoAction(), + RedirectKey(key=), + RedirectKey(key=), RedirectKey(key=,modifiers=Mod1,clearmods=Control) ] }; diff --git a/.xkb/types/mac_gui b/.xkb/types/mac_gui index 3074610..fbd227a 100644 --- a/.xkb/types/mac_gui +++ b/.xkb/types/mac_gui @@ -1,15 +1,29 @@ default partial xkb_types "addmac_levels" { + Virtual_modifiers Super; type "ONE_LEVEL_CTRL" { - modifiers= Mod1+Control+Shift; - map[Mod1]= Level2; - map[Control]= Level3; - map[Mod1+Control]= Level3; - map[Shift+Control]= Level4; - map[Shift+Mod1] = Level5; - level_name[Level1]= "Base"; - level_name[Level2]= "Alt"; - level_name[Level3]= "Control"; - level_name[Level4]= "Shift with Control"; - level_name[Level5] = "Shift Alt"; + modifiers = Shift+Mod1+Super+Control; + map[Shift] = Level2; + map[Mod1] = Level3; + map[Shift+Mod1] = Level4; + map[Control] = Level5; + map[Shift+Control] = Level6; + map[Super] = Level7; + map[Shift+Super] = Level8; + map[Mod1+Control] = 9; + map[Super+Control] = 10; + map[Super+Mod1] = 11; + map[Super+Mod1+Control] = 12; + level_name[Level1] = "Base"; + level_name[Level2] = "Shift"; + level_name[Level3] = "Alt"; + level_name[Level4] = "Shift Alt"; + level_name[Level5] = "Control"; + level_name[Level6] = "Shift Control"; + level_name[Level7] = "Super"; + level_name[Level8] = "Shift Super"; + level_name[9] = "Control Alt"; + level_name[10] = "Super Control"; + level_name[11] = "Super Alt"; + level_name[12] = "Super Control Alt"; }; }; diff --git a/references/symbol_names.txt b/references/symbol_names.txt index 0c2c517..e07ff75 100644 --- a/references/symbol_names.txt +++ b/references/symbol_names.txt @@ -22,8 +22,8 @@ AD07=u,U AD08=i,I AD09=o,O AD10=p,P -AD11=racketleft,braceleft -AD12=racketright,braceright +AD11=bracketleft,braceleft +AD12=bracketright,braceright AC01=a,A AC02=s,S AC03=d,D @@ -45,7 +45,7 @@ AB07=m,M AB08=comma,less AB09=period,greater AB10=slash,question -BKSL=ackslash,bar +BKSL=backslash,bar hidden partial alphanumeric_keys xkb_symbols=media_common @@ -1361,7 +1361,7 @@ partial alphanumeric_keys xkb_symbols=pc105 -partial alphanumeric_keys +partial alphanumeric_keysf xkb_symbols=htcdream BKSP=BackSpace RTRN=Return