How can I assign a macro to a key combination? I didn’t find this information in the docs.

Ok, found it. In the keymap there is a selection called “My Macros” where one can find the macros that were made known to EmEditor via Macros/Customize. [BTW: The process is a bit awkward]

The code isn’t perfect because the result for insert depends on where the cursor is located at the time the copy happens.

I want the insert to always insert the copied line as a complete new line. Does it help to add a NL/CR at the beginning and end of the copied line?