Set keymapAction and secondary actions

When I configure a key action using set keymapAction, how are secondary actions affected, and how are secondary actions set?

The reference documentation says:

ACTION = { macro MACRONAME | keystroke SHORTCUT | none }

So I read that as you cannot set a secondary action this way. But what if the key already has a secondary action mapped, and I set a different keystroke? Will this remove the previous secondary action, or will it stay mapped?

Is there any way to change the secondary action using smart macros?

@kareltucek

how are secondary actions affected,

I believe they are overwritten.

and how are secondary actions set?

They are not.

Is there any way to change the secondary action using smart macros?

You can always bind a macro instead of a regular action.

Yeah, I was afraid that those would be the answers. That makes it difficult to activate and deactivate secondary roles dynamically, and I will need a large amount of macros to map each secondary (for home row mods).

Thanks for the answers.

I just realised I may be able to achieve part of what I want with overlayLayer. I will experiment.