The default window navigation shortcuts and modifier keys are absurd. This will map them closer to what every other platform uses.
- Remap the fn key to command, since most apps use that as the "primary" modifier (a la Windows/Linux) and it being the corner key is the most ergonomic
- Remap the control key to fn, since it's in the usual fn spot on the mbp keyboard
- Leave option key alone but treat it as the Super key for various shortcuts
- Remap the command key to control
- Control+backspace, control+left, control+right (and shifted variants thereof) to move word-at-a-time instead of line-at-a-time (line at a time is still available on the "control" modifier, which makes more sense since it's less used, it should be on the less ergonomic modifier
- Remap home + end to go to the beginning/end of the line instead of the beginning/end of the entire document. Seriously, who would ever want that. Shifted variants as well to select.
- There will also be a bunch of rules we'll write to catch special cases where we need to shove some of these combos off to unused (F16-F20) keys due to idiosyncrocies of "the MBP keyboard inexplicably unmaps the command key to option" and "it's nearly impossible to disable the default window command+tab switcher on OSX."
- Reasonable shortcuts for taking a screenshot and locking the screen
- Good window management using the option key+arrows (a la Windows)
Add the following simple shortcuts:
(Note: these modifier keys are mapped to Right variants. This is due to... other rules being able to see specifically these keys and working around weird OSX remapping of the physical fn key)
Add all of these complex modifications (these are attached to the Gist):
To get the command+arrow key word-selection setup to work properly, we have to make a modification here:
nano ~/Library/KeyBindings/DefaultKeyBinding.dict
add the following:
{
"@$\UF702" = moveWordBackwardAndModifySelection:; /* Cmd+Shift+Left → select word left */
"@$\UF703" = moveWordForwardAndModifySelection:; /* Cmd+Shift+Right → select word right */
/* Home/End → beginning/end of line instead of document. */
"\UF729" = moveToBeginningOfLine:;
"\UF72B" = moveToEndOfLine:;
"$\UF729" = moveToBeginningOfLineAndModifySelection:;
"$\UF72B" = moveToEndOfLineAndModifySelection:;
}
Unfortunately, I haven't figured out a way to get perfect behavior around this (shift+command+arrow still selects to front/end of line in non-Cocoa input fields) but this is better than nothing.
We have to use the special shortcut keys and get the config to look like this. You might have to add temoprary Karabiner simple remappings to be able to type these:
Likewise, may need temporary remappings to be able to type these:
Basically, turn everything off except the shortcuts in the following screenshots.
Important: the shortcuts in the "Windows" section are still active even when disabled(?!). You have to map them to nonsense or obscure combos so OSX stops intercepting them, like this:
Other surviving shortcuts (many remapped to sensible values):