4

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.

1 Answer 1

4

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .