Ah. I misinterpreted the requirement. I was under the impression you wanted one key to do one of two tasks, rather than having one key do either one or two tasks.
My original example can easily be modified for this:
Press A key and hold for 0,05 seconds and release
Set decimal [~CommandStart] value to the converted value of {DATETICKS}
Write '[Blue] {TIMESECOND}:{TIMEMILLISECOND}' to log
Start Loop While : [{STATE_KEYSTATE:NUM+}] Equals '1'
Begin Text Compare : [{EXP: {DATETICKS} > ({DEC:~CommandStart} + 10000000)}] Equals '1'
Press B key and hold for 0,05 seconds and release
Write '[Blue] {TIMESECOND}:{TIMEMILLISECOND}' to log
Exit Command
End Condition
End Loop
The command will terminate as soon as the key is released, rather than waiting ~1000ms. Whether that's necessary/worth the overhead, I'll let you be the judge.
And Gary's version in VoiceAttack actions:
Press A key and hold for 0,05 seconds and release
Pause 1 second
Begin Text Compare : [{STATE_KEYSTATE:NUM+}] Equals '1'
Press B key and hold for 0,05 seconds and release
End Condition