emacs key bindings in mac os x (cocoa)

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:

<pre class="src src-C"><span style="color: #ff4500;">/* </span><span style="color: #ff4500;">http://www.erasetotheleft.com/post/mac-os-x-key-bindings/ </span><span style="color: #ff4500;">*/</span>

/* 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 / “~\UF728″ = “deleteWordForward:”; / delete / “\UF729″ = “moveToBeginningOfDocument:”; / home / “\UF72B” = “moveToEndOfDocument:”; / end / “@\UF729″ = “moveToBeginningOfParagraph:”; / A-home / “@\UF72B” = “moveToEndOfParagraph:”; / A-end / “@\UF700″ = “moveToBeginningOfDocument:”; / A-up / “@\UF701″ = “moveToEndOfDocument:”; / A-down / “\^\UF700″ = “pageUp:”; / C-up / “\^\UF701″ = “pageDown:”; / C-down / “\UF72C” = “pageUp:”; / page-up / “\UF72D” = “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:”; }

About Vinh Nguyen

Statistician

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>