Author Topic: Basic keypress to log?  (Read 2201 times)

woofer

  • Newbie
  • *
  • Posts: 18
    • Youtube channel
Basic keypress to log?
« on: December 23, 2022, 04:34:08 AM »
Hey all!

I am learning a new game, and as per usual I use voice and physical keys interchangeably.

I now realize it would be nice to have a way to have VoiceAttack tell me in the log what buttons that last voice command just activated. Hopefully that will make me get faster at relearning all the keys the next time I get back in.

Disregarding textvariables with Quick Input, is there a method or setting in VoiceAttack that can display keypresses that were created using the standard "Edit a command" window. A listening inline function perhaps?

I am completely stumped on this one and feel like I have to be missing something very obvious in the manual or the program windows.

To be fair it might also be a very niche user case. The reason I want the "Edit a command" type deal is mostly to make it more accessible for friends.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Basic keypress to log?
« Reply #1 on: December 23, 2022, 12:44:07 PM »
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.

woofer

  • Newbie
  • *
  • Posts: 18
    • Youtube channel
Re: Basic keypress to log?
« Reply #2 on: December 27, 2022, 02:11:02 PM »
Thanks Pfeil, that is very illuminating as always.

I will fall back to manually write the value to log and come back to it if that token gets put into VoiceAttack.

Thanks!