Brian Litzinger writes:

Coming from many years of using a PC I like my home and end keys to work like they do on a PC, not on the Mac. Not sure if you prefer the PC or Mac defaults for home and end, but here is how you change it. This will change how the home and end keys work in every program.

Save this to Users/username/Library/KeyBindings/DefaultKeyBinding.dict

    "UF729"  = "moveToBeginningOfLine:";
    "$UF729" = "moveToBeginningOfLineAndModifySelection:";
    "UF72B"  = "moveToEndOfLine:";
    "$UF72B" = "moveToEndOfLineAndModifySelection:";
    "UF72C"  = "pageUp:";
    "UF72D"  = "pageDown:";

After saving the file, your home and end keys will work like they do in most other operating systems, moving the cursor to the front and end of a line. Holding shift will cause the whole line to be selected. The last couple lines also adjust the page up and down keys, which will move the cursor up and down a page instead of just scroolling. Any applications you are running will need to be restarted before this takes effect.