Mac Key Bindings
Posted by Scott Hughes Tue, 28 Feb 2006 17:18:00 GMT
OS X has an annoying (at least, to me) idea about how the Home/End keys should work. For a while, I tolerated it because it was my duty as a switcher. But, going back and forth between my work PC and my home Mac is painful (especially now that my home Mac is sitting next to my work PC). I finally stumbled upon this reference to help over write the default key bindings to come up with something that’s a little more natural for me. Here’s what I used for my new key bindings
/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
/* Home Key */
"\UF729" = "moveToBeginningOfLine:";
"^\UF729" = "moveToBeginningOfDocument:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
/* End Key */
"\UF72B" = "moveToEndOfLine:";
"^\UF72B" = "moveToEndOfDocument:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
/* Left Arrow Key */
"^\UF702" = "moveWordBackward:";
"$^\UF702" = "moveWordBackwardAndModifySelection:";
/* Right Arrow Key */
"^\UF703" = "moveWordForward:";
"$^\UF703" = "moveWordForwardAndModifySelection:";
}
I played around with trying to get the Shift+Delete combo to do a forward-delete (like Windows Delete key, instead of like Backspace), but I couldn’t get that to work. My MacBook Pro keyboard only has the one Delete key, but if I use a Windows keyboard the Windows Delete key works as expected. I’d be interested if anyone else had a tip about a good way to get a convenient forward-delete on my MacBook keyboard.
Update 3/11/2006:
Apparently, on all Apple laptops, the mapping for a forward delete is fn + delete. However, it seems I can’t use fn + [cmd|opt|ctrl] + delete to do any fancier forward deleting (like “forward delete word), because once I press any of the modifier buttons it’s as if the fn button is ignored in the combo.


Articles Only
