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'd like to change the default text navigation buttons for OSX (Mountain Lion).
That is, currently the key to move iterate tokens when editing a text file (or in XCode) is alt, and command for BOL/EOL.

I want to edit the default keys such that command is used to iterate through tokens, and either (alt+command+direction) or (fn+direction) is used for BOL/EOL.

I couldn't seem to find it in the key settings of each program, so I suppose it is some sort of default setting of the OS. Where and how can I change to achieve the above behaviour?

Thanks in advance,
Dan

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can create custom key bindings that will apply in most OS X text editors (specifically, those that use the Cocoa framework).

Check out KeyBindingsEditor, which provides a front end to the key bindings system.

Alternatively, you can create a DefaultKeyBinding.dict plist file in ~/Library/KeyBindings/ that allows you to specify custom keybinding actions. You should read Apple's documentation for the precise actions available.

In your case, you'll probably want the moveWordForward: and moveWordBackward: methods, if I'm parsing your question correctly.

share|improve this answer
    
Thanks! The KBE GUI did not seem to load, so I've edited the key bindings file myself. I am currently looking for more options rather than moveWordForward and moveWordBackward (Such as, when using both shift and cmd, only a work should be marked etc). –  Edgepo1nt Mar 25 '13 at 20:09
    
I am having some sort of weird issue. After editing the binding of cmd+right, Safari does not input cmd+right as it should've (Forward, Backward web pages). Why is that? –  Edgepo1nt Mar 25 '13 at 21:01
    
It may be that there's an active text field overriding the default behaviour. Make sure there are no active text fields, then try again. –  robmathers Mar 25 '13 at 22:11
    
There are absolutely no active text fields. Checked it also on sites that have no text fields at all. Any other possible explanation and/or solution? –  Edgepo1nt Mar 25 '13 at 22:43

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.