To have home
and end
keys funciton on a Mac as they do on a PC:
Create the file ~/Library/KeyBindings/DefaultKeyBinding.dict
This file will likely not exist and you may also need to create the KeyBindings
directory.
In the file, insert this code.
{
"\UF729" = moveToBeginningOfLine:; // home
"\UF72B" = moveToEndOfLine:; // end
"$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
}
You will have to close and open your applications for this change to take effect.