I do not have a Mac and therefore have used never Mac version of UltraEdit.
I'm surprised that UEM does not have command
Top to move the caret to top of the file. I suggest to start recording a macro, press the key combination which moves caret to top of the file, stop macro recording, open the macro editor and look which command was recorded for moving the caret to top of the file. Use this command instead of
Top.
A replacement for command
Key Home and the next 3 commands was posted already by me above. So there should be no problem to replace the 2 occurrences of the 4 lines containing command
Key Home by
GotoLine 0 1 in the macro to move caret to first column in current line. You could also simply record the execution of the key combination moving caret to beginning of a line.
According to
OS X keyboard shortcuts the keys
Command-Up Arrow need to be pressed to move caret to beginning of the file and the keys
Command-Left Arrow to move the caret to beginning of the current line.
Nowadays I would nevertheless suggest to use the script solution instead of this macro solution as it does not modify the file temporarily resulting in adding 2 steps to undo chain.