create usecontrol (with label and exit button). You can catch key press events and it is for user also pretty to know that a macro is (still) running.
I've used mouse button events in the past so I expected to see something similar for key press events. If similar events exist for keyboard presses, they should show up on this list: 2017 SOLIDWORKS API Help - SolidWorks.Interop.sldworks Namespace
Unfortunately, it doesn't look like Solidworks exposes keyboard events through the API. There are probably workarounds but they may not be as elegant as intercepting events through Solidworks.
You might consider the following approaches:
1. Display a user form and assign hotkeys to particular buttons on that form or implement key press event handlers with the form. I think these would only work as hotkeys while the form has context which might feel sort of clunky from the user's perspective.
2. Work with Windows keyboard events or poll for changes in the keyboard state. I'm not sure how to do this but I would be surprised if there wasn't an example somewhere on the net. Going this route, it would probably be cleaner to build this thing as an add-in rather than a macro - especially if you have to poll for keyboard state.