How to use Ctrl+left/Ctrl+Right (instead of Alt+left/Alt+right) to move to the previous/next word

keyboard

On a Mavericks system, I would like to use Ctrl+left/Ctrl+right instead of Alt+left/Alt+right to move to the next word or the previous word.

Mission Control is not using Ctrl+left/Ctrl+right (I changed that from the default value).

Is it possible to do this with some system setting (i.e. without a keymapper)?

Best Answer

You can use KeyRemap4MacBook with a private.xml such as this:

<?xml version="1.0"?>
<root>
  <item>
    <name>⌃← & ⌃→ to ⌥← & ⌥→</name>
    <identifier>remapCtrlLeftAndCtrlRightToAltLeftAndAltRight</identifier>
    <autogen>
      __KeyToKey__
      KeyCode::CURSOR_LEFT, VK_CONTROL | ModifierFlag::NONE,
      KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_L
    </autogen>
    <autogen>
      __KeyToKey__
      KeyCode::CURSOR_RIGHT, VK_CONTROL | ModifierFlag::NONE,
      KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_L
    </autogen>
  </item>
</root>

I'm not aware of any System Preferences setting regarding this.


With regard to comment, change the contents of the <autogen> to…

__KeyToKey__
KeyCode::CURSOR_LEFT, VK_OPTION | ModifierFlag::NONE,
KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_L
__KeyToKey__
KeyCode::CURSOR_RIGHT, VK_OPTION | ModifierFlag::NONE,
KeyCode::CURSOR_RIGHT, ModifierFlag::CONTROL_L