Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer

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.