Option-Delete will remove the word to the left of the cursor.

Is it possible to remap this behavior to Control-Delete or Control-W?

For extra credit... is it feasible to remap CTRL-Left/Right Arrow to do the same thing as Option-Left/Right Arrow, i.e. to jump words?

I'm running Mac OS X Lion 10.7.2.

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

Make ~/Library/Keybindings/ and save something like this as DefaultKeyBinding.dict:

{
    "^\U007F" = deleteWordBackward:; // ctrl-delete (forward delete would be ^\UF728)
    "^\UF702" = moveWordBackward:; // ctrl-left
    "^\UF703" = moveWordForward:; // ctrl-right
}

The changes will be applied after you reopen applications. DefaultKeyBinding.dict is not supported by some cross-platform applications, Xcode, or Terminal.

More information: hcs.harvard.edu/~jrus/Site/cocoa-text.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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