Or (EDIT: whoops, Ctrl not Cmd) Ctrl-A and Ctrl-E, Emacs style. In fact, a lot of Emacs navigation combos work just about everywhere on macOS. I have a keyboard with all of the keys the laptop keyboard leaves off, but I find that I don’t use them on macOS.