- Added 7 more levels for mac_gui symbols, app switching wip, added G remap for sublime text.

This commit is contained in:
Ben Reaves
2020-02-23 22:49:18 -06:00
parent 324e4d83c6
commit 3f4b5241eb
3 changed files with 209 additions and 41 deletions

View File

@@ -1,40 +1,147 @@
// Template
// replace key <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=<KEY>,modifiers=NewMod,clearmods=Mod1),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Shift),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Alt),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Control),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Mod1),
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Mod1)
// ]
// };
default partial xkb_symbols "mac_levelssym" { default partial xkb_symbols "mac_levelssym" {
// Fix the G key for Sublime Text
replace key <AC05> {
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=<AC05>),
RedirectKey(key=<AC05>),
// Find Next
RedirectKey(key=<FK03>,clearmods=Control),
// Find Previous
RedirectKey(key=<FK03>,clearmods=Control),
// Sublime Goto Line
RedirectKey(key=<AC05>,modifiers=Control,clearmods=Super),
NoAction(),
// Sublime Quick Find
RedirectKey(key=<FK03>,clearmods=Mod1),
// Sublime Select All Matches
RedirectKey(key=<FK03>,modifiers=Mod1,clearmods=Super+Control),
NoAction(),
NoAction()
]
};
// LEFT to Begin Line or Beginning of word // LEFT to Begin Line or Beginning of word
replace key <LEFT> { replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL", type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Left, Left, NoSymbol,NoSymbol,Left ], symbols[Group1]= [
Left,
Left,
Left,
Left,
NoSymbol,
NoSymbol,
Left
],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
RedirectKey(key=<LEFT>,modifiers=Control,clearmods=Mod1), NoAction(),
// Wordwise
RedirectKey(key=<LEFT>,clearmods=Mod1),
RedirectKey(key=<LEFT>,clearmods=Mod1),
RedirectKey(key=<HOME>,clearmods=Control), RedirectKey(key=<HOME>,clearmods=Control),
RedirectKey(key=<HOME>,modifiers=Shift,clearmods=Control+Mod1), RedirectKey(key=<HOME>,clearmods=Control),
RedirectKey(key=<LEFT>,modifiers=Shift+Control,clearmods=Mod1) // Change workspace
NoAction(),
// Wordwise - Sublime?
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Super)
] ]
}; };
// Right to End of Line or end of word // Right to End of Line or end of word
replace key <RGHT> { replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL", type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Right, Right, NoSymbol, NoSymbol,Right ], symbols[Group1]= [
Right,
Right,
Right,
Right,
NoSymbol,
NoSymbol,
Right
],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
RedirectKey(key=<RGHT>,modifiers=Control,clearmods=Mod1), NoAction(),
// Wordwise
RedirectKey(key=<RGHT>,clearmods=Mod1),
RedirectKey(key=<RGHT>,clearmods=Mod1),
RedirectKey(key=<END>,clearmods=Control), RedirectKey(key=<END>,clearmods=Control),
RedirectKey(key=<END>,modifiers=Shift,clearmods=Control+Mod1), RedirectKey(key=<END>,clearmods=Control),
RedirectKey(key=<RGHT>,modifiers=Shift+Control,clearmods=Mod1) // Change workspace
NoAction(),
// Wordwise - Sublime?
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Super)
] ]
}; };
// Up to Mac Home //Up to Mac Home
replace key <UP> { replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL", type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ symbols[Group1]= [
Up, Up,
Up, Up,
NoSymbol Up,
Up,
NoSymbol,
NoSymbol,
Up
], ],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
NoAction(), NoAction(),
RedirectKey(key=<HOME>) // Wordwise
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<UP>,clearmods=Mod1),
RedirectKey(key=<HOME>),
RedirectKey(key=<HOME>),
// Wordwise - Sublime?
RedirectKey(key=<PGUP>,clearmods=Super),
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
] ]
}; };
// Down to Mac End // Down to Mac End
@@ -43,28 +150,67 @@ default partial xkb_symbols "mac_levelssym" {
symbols[Group1]= [ symbols[Group1]= [
Down, Down,
Down, Down,
NoSymbol Down,
Down,
NoSymbol,
NoSymbol,
Down
], ],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
NoAction(), NoAction(),
RedirectKey(key=<END>) // Wordwise
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<DOWN>,clearmods=Mod1),
RedirectKey(key=<END>),
RedirectKey(key=<END>),
// Wordwise - Sublime?
RedirectKey(key=<PGDN>,clearmods=Super),
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
] ]
}; };
// Alt BKSP to DELETE // Alt BKSP to DELETE
replace key <BKSP> { replace key <BKSP> {
type[Group1]= "ONE_LEVEL_CTRL", type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ symbols[Group1]= [
BackSpace, BackSpace,
BackSpace, BackSpace,
NoSymbol BackSpace
], ],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1), NoAction(),
NoAction() RedirectKey(key=<DELE>,clearmods=Mod1)
] ]
}; };
// Cycle App and In App Tab Switching
replace key <TAB> {
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=<FK18>,clearmods=Mod1),
RedirectKey(key=<FK18>,clearmods=Mod1),
// Also need to remap on the DE level
// to backslash \ for Cmd+Tab
RedirectKey(key=<BKSL>),
RedirectKey(key=<BKSL>),
RedirectKey(key=<TAB>,modifiers=Control,clearmods=Mod4),
RedirectKey(key=<TAB>,modifiers=Control+Shift,clearmods=Mod4)
]
};
// // Full Print Screen // // Full Print Screen
// // GalliumOS // // GalliumOS
// replace key <AE03> { // replace key <AE03> {
@@ -101,11 +247,15 @@ partial xkb_symbols "mac_chrome" {
symbols[Group1]= [ symbols[Group1]= [
Left, Left,
Left, Left,
NoSymbol,
NoSymbol,
Left Left
], ],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
RedirectKey(key=<UP>), NoAction(),
RedirectKey(key=<FK18>),
RedirectKey(key=<FK18>),
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control) RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
] ]
}; };
@@ -115,11 +265,15 @@ partial xkb_symbols "mac_chrome" {
symbols[Group1]= [ symbols[Group1]= [
Right, Right,
Right, Right,
NoSymbol,
NoSymbol,
Right Right
], ],
actions[Group1]= [ actions[Group1]= [
NoAction(), NoAction(),
RedirectKey(key=<DOWN>), NoAction(),
RedirectKey(key=<FK18>),
RedirectKey(key=<FK18>),
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control) RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
] ]
}; };

View File

@@ -1,15 +1,29 @@
default partial xkb_types "addmac_levels" { default partial xkb_types "addmac_levels" {
Virtual_modifiers Super;
type "ONE_LEVEL_CTRL" { type "ONE_LEVEL_CTRL" {
modifiers= Mod1+Control+Shift; modifiers = Shift+Mod1+Super+Control;
map[Mod1]= Level2; map[Shift] = Level2;
map[Control]= Level3; map[Mod1] = Level3;
map[Mod1+Control]= Level3; map[Shift+Mod1] = Level4;
map[Shift+Control]= Level4; map[Control] = Level5;
map[Shift+Mod1] = Level5; map[Shift+Control] = Level6;
level_name[Level1]= "Base"; map[Super] = Level7;
level_name[Level2]= "Alt"; map[Shift+Super] = Level8;
level_name[Level3]= "Control"; map[Mod1+Control] = 9;
level_name[Level4]= "Shift with Control"; map[Super+Control] = 10;
level_name[Level5] = "Shift Alt"; 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";
}; };
}; };

View File

@@ -22,8 +22,8 @@ AD07=u,U
AD08=i,I AD08=i,I
AD09=o,O AD09=o,O
AD10=p,P AD10=p,P
AD11=racketleft,braceleft AD11=bracketleft,braceleft
AD12=racketright,braceright AD12=bracketright,braceright
AC01=a,A AC01=a,A
AC02=s,S AC02=s,S
AC03=d,D AC03=d,D
@@ -45,7 +45,7 @@ AB07=m,M
AB08=comma,less AB08=comma,less
AB09=period,greater AB09=period,greater
AB10=slash,question AB10=slash,question
BKSL=ackslash,bar BKSL=backslash,bar
hidden partial alphanumeric_keys hidden partial alphanumeric_keys
xkb_symbols=media_common xkb_symbols=media_common
@@ -1361,7 +1361,7 @@ partial alphanumeric_keys
xkb_symbols=pc105 xkb_symbols=pc105
partial alphanumeric_keys partial alphanumeric_keysf
xkb_symbols=htcdream xkb_symbols=htcdream
BKSP=BackSpace BKSP=BackSpace
RTRN=Return RTRN=Return