Posts filed under 'Mac OS X'

Fix the Home and End Keys for Mac OS X and Eclipse (Flex Builder)

Marc-Antoine Ross November 15th, 2007 Add comment

You’ll edit a system file, be careful.

If the file or folder doesn’t already exist, you need to create it. Here’s the easy way to do it in Terminal (easier, because Finder doesn’t let you see hidden files easily).

Open Terminal (Applications -> Utilities -> Terminal) and type the following commands:

cd ~/Library

If the KeyBindings folder doesn’t exist in that folder, create it:

mkdir KeyBindings

Make or edit the DefaultKeyBinding.dict file:

vi KeyBindings/DefaultKeyBinding.dict

Paste the following lines:

{
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* page up/down */
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
}

Save the file. Now when you re-launch your applications, they should use the new Bindings.

Eclipse doesn’t follow anyone’s default key layout, it is standard based on the version you download… so basically to get this to work do this:

Eclipse -> Preferences -> General -> Keys

You will be able to remove the Binding for Text Start, Text End and respectively replace them for Line Start, Line End. I will let you understand that part by yourself, as you will find interesting shortcuts at the same time. Do the same with for the Shift-Home and Shift-End keys.

You should now have the home and end keys going to the beginning and end of the line.

Firefox still seems to have an issue…

Schedule

February 2012
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
272829