There is no built-in method to retrieve which keys are currently pressed, without specifying every single key you want to check (
a feature suggestion has been made for a catch-all token), nor to trigger something when any key is pressed (I.E. without polling).
If you can edit the commands you're using, simplest (though labor-intensive) option would probably be to manually add "Write a Value to the Event Log" actions to your commands with that information.
An inline function could theoretically be used, but you'd need to look into keyboard hooking, and make sure that hook does not interfere with VoiceAttack's own hook(s).
Otherwise you'd need a very lengthy command that uses either the "Device State" tab or the "{STATE_KEYSTATE:}" token to check every single key that may be relevant to you. Performance may be an issue there if the timings need to be reasonably accurate.