-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated xkb configs to accept macOS word-wise text manipulations. C…
…loses #2.
- Loading branch information
Showing
5 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
default partial xkb_symbols "mac_onelvlsym" { | ||
// LEFT to Begin Line | ||
replace key <LEFT> { | ||
type[Group1]= "ONE_LEVEL_CTRL", | ||
symbols[Group1]= [ Left, Left, NoSymbol ], | ||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>,clearmods=Control)] | ||
}; | ||
// Right to End of Line | ||
replace key <RGHT> { | ||
type[Group1]= "ONE_LEVEL_CTRL", | ||
symbols[Group1]= [ Right, Right, NoSymbol ], | ||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>,clearmods=Control)] | ||
}; | ||
// Up to Mac Home | ||
replace key <UP> { | ||
type[Group1]= "ONE_LEVEL_CTRL", | ||
symbols[Group1]= [ Up, NoSymbol ], | ||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>)] | ||
}; | ||
// Down to Mac End | ||
replace key <DOWN> { | ||
type[Group1]= "ONE_LEVEL_CTRL", | ||
symbols[Group1]= [ Down, NoSymbol ], | ||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>)] | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
default partial xkb_types "addmac_onelvl" { | ||
type "ONE_LEVEL_CTRL" { | ||
modifiers= Shift+Control; | ||
map[Shift]= Level2; | ||
map[Control]= Level3; | ||
map[Shift+Control]= Level3; | ||
level_name[Level1]= "Base"; | ||
level_name[Level2]= "Caps"; | ||
level_name[Level3]= "With Control"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
mkdir -p ~/.xkb/{keymap,symbols,types} | ||
cp ./.xkb/symbols/mac_onelvl ~/.xkb/symbols/mac_onelvl | ||
cp ./.xkb/types/mac_onelvl ~/.xkb/types/mac_onelvl | ||
setxkbmap -option | ||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.onelvl | ||
line=$(cat ~/.xkb/keymap/kbd.mac.onelvl | grep -n 'xkb_symbols' | cut -f1 -d:) | ||
sed -ie "${line}s/)\"/)+altwin(ctrl_alt_win)+mac_onelvl(mac_onelvlsym)\"/g" ~/.xkb/keymap/kbd.mac.onelvl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters