Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to be able to use Command arrow keys to navigate by word like you can with Ctrl. I've disabled the Mission Control mappings already. What's the easiest way to remap?

share|improve this question
1  
FYI, you can use option-arrow to move between words. –  Nathan Greenstein Nov 29 '12 at 2:46
    
I know. I'd like it to be Command. –  Dominic Bou-Samra Nov 29 '12 at 2:51
add comment

1 Answer

You can change the default keybindings for OS X text editing with the DefaultKeyBinding.dict file. Make a new text file at ~/Library/KeyBindings/DefaultKeyBinding.dict, with these contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>^&#xF702;</key>
    <string>moveWordLeft:</string>
    <key>^&#xF703;</key>
    <string>moveWordRight:</string>
</dict>
</plist>

Restart or log out and in, and controlleft and controlright should do what you're looking for. This will work in most OS X apps, but there are some (typically third party text editors) that use their own bindings, which will need to be switched on a case-by-case basis.

share|improve this answer
    
Shouldn't you use &#xF702; instead of \UF702? –  Lauri Ranta Nov 29 '12 at 8:28
    
I don't think so. Per Apple's Developer guide to Key Bindings, ^ is the proper character for the control modifier, and the NSEvents docs, left and right are unicode F702 and F703. –  robmathers Nov 29 '12 at 15:45
    
Oh, my mistake, just did a little more testing and I forgot to account for unicode encodings. Answer updated accordingly. –  robmathers Nov 29 '12 at 16:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.