MacOS – Change Ctrl+Arrow and Ctrl+Shift+Arrow to jump/jump+select a single word rather than the whole line

keyboardmacossettingsshortcut-menu

In order to change the way home and end function on OS X so it matches other devices I frequently utilised this 'hack'. Is there a similar way to override the way Ctrl+arrow and Ctrl+Shift+arrow work?

I appreciate that if I was completely moving to OS X it's silly, however, when all other devices use these keys in this fashion it makes sense to reconfigure them on the one device that doesn't match.

In short, I want to make ctrl+left/right arrow jump by word/punctuation separator as it does on Ubuntu and Windows rather than to the end of line.

I would prefer to use a native override rather than installing an app to perform this task, but if that's not possible then please let me know of any apps.

Best Answer

Create ~/Library/KeyBindings/ and save a property list like this as DefaultKeyBinding.dict:

{
  "^\UF702" = moveWordLeft:;
  "^\UF703" = moveWordRight:;
  "^$\UF702" = moveWordLeftAndModifySelection:;
  "^$\UF703" = moveWordRightAndModifySelection:;
}

Then quit and reopen applications to apply the changes.

See http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html or http://lri.me/keybindings.html for more information.