Skip to Content

Free TUAW iPhone app -- try it now!
AOL Tech

keycombinations posts

Filed under: Productivity, Terminal Tips

Remapping Key Combinations

Some people may think I am pro-*nix, but actually I really just like getting information out there for all our readers. Today I came across a great tip on Switch about Windows-like key bindings. If you don't dig the way Apple has the start and end key combos mapped in OS X, you can change them by creating the file ~/Library/KeyBindings/DefaultKeyBinding.dict with the following contents:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict - Home/End keys more like Windows */
{
"\UF729" = "moveToBeginningOfLine:"; /* home */
"\UF72B" = "moveToEndOfLine:"; /* end */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* shift home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* shift end */
"^\UF729" = "moveToBeginningOfDocument:"; /* control home */
"^\UF72B" = "moveToEndOfDocument:";/* control end */
}


I personally tested this key binding hack in 10.4.4 and it does work. To test it be sure to quit out of your text application first. Also note that you will have to create a KeyBindings/ directory in your ~/Library/ because it is not there by default. To reverse the key bindings back to normal, just delete the DefaultKeyBinding.dict file you created and restart your text application. If there is a simpler GUI way to create these modifications please post about it in the comments for our readers.

If on the other hand you live in Terminal like me, the start of line and end of line key bindings are Control-A and Control-E respectively. This should feel comfortable to people accustomed to the normal Emacs mode in a shell in other *nix based operating systems.

[via Switch and comments on Ask Slashdot]

Tip of the Day

To get an instant map to any address, just go to your Address Book and right click on the address field of any one of your contacts and select "Map Of." The address will then be revealed in Google Maps on Safari. You can do the same if a data detector determines there is an address in an e-mail in Mail.


Follow us on Twitter!
 TUAW [Cafepress]

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
Storyist 2.0
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor

 

More Apple Analysis

AOL Radio TUAW on Stitcher