TextEdit key bindings modified in DefaultKeyBinding.dict stopped working

keyboardtextedit

I have customized text editing bindings in ~/Library/KeyBindings/DefaultKeyBinding.dict but they all stopped working in TextEdit.app when I upgraded to Lion. They still work fine in other Cocoa apps like Safari.

The system default bindings like ^F for moveForward: work as usual.

Has anyone else who uses DefaultKeyBinding.dict noticed this? Is there a way to fix it or any other way of customizing the key bindings in TextEdit?

Best Answer

The problem was that I had moved the actual DefaultKeyBinding.dict file somewhere else for version-control purposes and symlinked to it.

Most apps were loading the file through the symlink, but TextEdit (and, it turns out, a couple other apps that I thought just didn't support key bindings) must do something different and didn't see it.

So, oops, lesson learned. Don't symlink your system configuration files.