emacs key bindings in mac os x (cocoa)

Coding
Emacs
Mac OS X
Author

Vinh Nguyen

Published

September 17, 2009

so im very used to emacs keybindings. i use it for emacs and conkeror so often times i hit M-w etc and these keys don't work in mac os x. this sucks. i googled it, and found this and this. guess u can have emacs keybindings in mac os x…for programs that use the cocoa appkit. too bad this doesn't work when i edit in neooffice or ms office.

my ~/Library/KeyBindings/DefaultKeybinding.dict looks like:

{c} /* http://www.erasetotheleft.com/post/mac-os-x-key-bindings/ / / http://www.gnufoo.org/macosx/ / / ~/Library/KeyBindings/DefaultKeyBinding.dict / / The original bindings are from Mike Ferris of lorax.com as shipped * with his TextExtras package. They were further modified by Mishka Gorodnitzky * (misaka@pobox.com), Patrick Linskey, and Llew Mason. / { “~f” = “moveWordForward:”; / M-f / “~b” = “moveWordBackward:”; / M-b / “~<” = “moveToBeginningOfDocument:”; / M-< / “~>” = “moveToEndOfDocument:”; / M-> / “~v” = “pageUp:”; / M-v / “^v” = “pageDown:”; / C-v / “~d” = “deleteWordForward:”; / M-d / “~^h” = “deleteWordBackward:”; / M-C-h / “~\010” = “deleteWordBackward:”; / M-backspace / “~\177” = “deleteWordBackward:”; / M-delete / “~” = “deleteWordForward:”; / delete / “” = “moveToBeginningOfDocument:”; / home / “72B” = “moveToEndOfDocument:”; / end / “@” = “moveToBeginningOfParagraph:”; / A-home / “@72B” = “moveToEndOfParagraph:”; / A-end / “@” = “moveToBeginningOfDocument:”; / A-up / “@” = “moveToEndOfDocument:”; / A-down / “^” = “pageUp:”; / C-up / “^” = “pageDown:”; / C-down / “72C” = “pageUp:”; / page-up / “72D” = “pageDown:”; / page-down / “^/” = “undo:”; / C-/ / “~c” = “capitalizeWord:”; / M-c / “~u” = “uppercaseWord:”; / M-u / “~l” = “lowercaseWord:”; / M-l / “^t” = “transpose:”; / C-t / “~t” = “transposeWords:”; / M-t / “~/” = “complete:”; / M-/ */ “^g” = “_cancelKey:“; /* C-g / “^a” = “moveToBeginningOfLine:”; / C-a / “^e” = “moveToEndOfLine:”; / C-e */ “~w” = “copy:”; “^w” = “cut:”; “^y” = “paste:”; } ```