Yes, exactly. It is run when you change to that keymap.
You could, of course, also run a similar keepAlive macro within the same keymap that you normally use, but the way I wrote the macro it will automatically terminate when you switch away from the special ---
keymap.
Anyway, I am glad you sorted it out. Enjoy