Choice between 2 keypress

Hello,
I am writing a macro to insert a preamble in texts I write.
Basically, I would like to:
1- wait until a key is pressed
2a- if the key a is pressed, then carry out these actions
2b- if the key b is pressed, carry out these other actions.

Another option would be
1- wait until a key is pressed
2a- if the key a is pressed, then carry out these actions
2b- if any other key is pressed, carry out these other actions.

I am confused. I tried pause until, if then else and case actions but have been unable to achieve the above

thanks in advance for your time and help

Simple solution: use a Conflict palette. Assign the same keystroke to two or more macros.

If you use aText it’s the same flow, assign the same keystroke to two different macros.

1 Like

Hi ronald. Your basic approach should work. Please upload your Macro so we can examine/test it.

See How to upload your macro. Instructions for uploading to an existing post are just below the main instruction.
You may also find this Macro useful: MACRO: Upload KM Macro to New or Existing Topic @KM [Pub]

@hello at my level, I think that you are right: just use a conflict palette (I use them all the time).
I wanted to be fancy and offer choices mid-macro, but I am just complicating things.
thanks very much for your comment.

@JMichaelTX thanks very much for your offer. I will opt for the simpler and robust solution of a conflict palette

1 Like

hello @hello @JMichaelTX

Please see my new post.