Home and End keys on a Mac: go to the start or end of a line
Short answer: on a Mac, go to the start of the line with ⌘+← and the end with ⌘+→. The Home and End keys usually scroll the page instead.
Mac equivalents
| What you want | Windows | Mac |
|---|---|---|
| Start of line | Home | ⌘← |
| End of line | End | ⌘→ |
| Select to start / end of line | Shift+Home / Shift+End | ⇧⌘← / ⇧⌘→ |
| Top of document | Ctrl+Home | ⌘↑ |
| Bottom of document | Ctrl+End | ⌘↓ |
| Page up / down | PgUp / PgDn | Fn+↑ / Fn+↓, or PgUp / PgDn |
Why Home and End behave differently
On a Mac, Home and End belong to scrolling: they move the view to the top or bottom of the page and leave your cursor where it was. So when you press End to jump to the end of a line, the page leaps to the bottom and your next keystroke lands back where you started. On a MacBook keyboard, Fn+← and Fn+→ act as Home and End, with the same behavior.
Ways to make Home and End work like Windows
1. A key bindings file
Advanced users can create ~/Library/KeyBindings/DefaultKeyBinding.dict to redefine Home and End. It only works in apps that use Apple's built-in text system, so it does nothing in Chrome, Microsoft Office, Slack, VS Code and many others, and it requires editing a hidden file by hand.
2. Muscle Memory
Muscle Memory makes Home and End go to the start and end of the line in every app, with Shift to select and Ctrl+Home and Ctrl+End for the top and bottom of the document, just like Windows. It also brings Ctrl+arrow word jumps and Ctrl+Backspace. Switch to Laptop Mode and the keys go back to normal Mac behavior.