This method changes the behavior like this:
| Key | Old behavior | New behavior |
|---|---|---|
| HOME | Beginning of document | Beginning of line |
| END | End of document | End of line |
| SHIFT + HOME | Select to beginning of document | Select to beginning of line |
| SHIFT + END | Select to end of document | Select to end of line |
Create or edit this file:
~/Library/KeyBindings/DefaultKeyBinding.dict
Add this code:
{
"\UF729" = moveToBeginningOfLine:;
"\UF72B" = moveToEndOfLine:;
"$\UF729" = moveToBeginningOfLineAndModifySelection:;
"$\UF72B" = moveToEndOfLineAndModifySelection:;
}
Save the file. I needed to logout and login again to apply the changes.
I tested this on MacOS Ventura and it works in Apple Pages and iaWriter. Be careful when remapping keys. The wrong settings can make your computer not working properly anymore!