Author Topic: How to get Debug Log for Commands/Keystrokes/Responses sent by VA?  (Read 4997 times)

Bearfoot

  • Guest
Hi,

I need help debugging some Voice Attack commands. The voice pattern is recognized, and presumably the key commands are being sent. But in-game responses are variable. The commands are a series of key-strokes with built-in delays. The keystrokes include numerous special key modifiers (e.g. "ALT-Shift-1"), so it cannot be easily read by, e.g., having a text editor open to receive the Voice Attack output.

Is there a way for me to track/monitor what key strokes etc. Voice Attack is actually send?

Alternatively, is there a decent key record logger that I could use to do this?

Thanks!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4778
  • RTFM
Re: How to get Debug Log for Commands/Keystrokes/Responses sent by VA?
« Reply #1 on: March 02, 2017, 12:14:05 PM »
in-game responses are variable.
Can elaborate on this? Are all keystrokes getting recognized, but not all the time? Or are some keystrokes never getting recognized while others are?

Bearfoot

  • Guest
Re: How to get Debug Log for Commands/Keystrokes/Responses sent by VA?
« Reply #2 on: March 02, 2017, 02:08:39 PM »
Hi!

That's the problem ... I don't know!

The voice command is definitely being recognized, according to the log. It's just the results are not always matching up with what you would expect if the entire set of responses were sent.

The profile is complex and multi-part, so when I say "Tune V H F to 135 decimal 050", there are different parts to handle the 135 and 050 part. I am unable to share the profile, unfortunately, because it is paid one and the author asked me not to share it.  The commands are to set a radio frequency in a flight simulator. It requires two dials to be manipulated. The simulator provides key-bindings to turn the dials, each each key (e.g. "LSHFT-LALT-LEFT") spinning a dial a particular number of clicks. The profile is huge, and has individual mappings for each frequency (e.g, "135" vs "136"), so the fact that they sometimes work and not always could mean individual commands in the profile have issues or something else.

I want to be able to capture the output of Voice Attack to see what keystrokes are being sent to see if the issue is the with the profile --- either in the number of keystrokes sent for each dial or the delays etc. --- or the way the keystrokes are consumed by the program. The profile also keeps track internally the current state of the frequencies, so once it gets unsync'd from the simulator's frequencies, tracking down issues becomes really problematical, and I have to restart everything! So I am really hoping for a simple way to keep track of exactly what is being sent by Voice Attack to the program, so I can verify that this is correct for each frequency call in isolation, eliminating an issue with the profile itself, before turning my attention to other parts/systems to fix.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4778
  • RTFM
Re: How to get Debug Log for Commands/Keystrokes/Responses sent by VA?
« Reply #3 on: March 02, 2017, 02:54:02 PM »
Would the simulator happen to be DCS? If that is the case you can open the control settings, and view which keystrokes are being recognized. The game will highlight the control that keybind is ascosiated with(if any, make sure you select the relevant aircraft).

Quote
I want to be able to capture the output of Voice Attack to see what keystrokes are being sent to see if the issue is the with the profile
If you want to know exactly what VoiceAttack will send, you can export the program profile and open it in a text editor that'll preserve the formatting. You can then cross-reference the keycodes with an ASCII table.

If you want to try capturing the keypresses instead, you could try using Autohotkey with the following script:
Code: [Select]
#InstallKeybdHook
KeyHistory
Run the script, execute your commands, then press F5 in the window that'll have appeared to display the logged keys.
« Last Edit: March 02, 2017, 03:31:38 PM by Pfeil »

Bearfoot

  • Guest
Re: How to get Debug Log for Commands/Keystrokes/Responses sent by VA?
« Reply #4 on: March 02, 2017, 03:20:49 PM »
Would the simulator happen to be DCS? If that is the case you can open the control settings, and view which keystrokes are being recognized. The game will highlight the control that keybind is ascosiated with(if any, make sure you select the relevant aircraft).

It is. And the individual key-binds are correct. If the problem is with the profile it might be in the particular combination, sequence, and/or delay. E.g, sending 3 x LALT-LSHIFT-RIGHT instead of 4 etc.

If you want to know exactly what VoiceAttack will send, you can export the program and open it in a text editor that'll preserve the formatting. You can then cross-reference the keycodes with an ASCII table.

Ah yes, but I do not know of a text editor that will be able to capture, e.g. "ALT-CTRL-1" or "ALT-SHIFT-2" (i.e., the advanced modifier keys). Do you have suggestions?

If you want to try capturing the keypresses instead, you could try using Autohotkey with the following script:
Code: [Select]
#InstallKeybdHook
KeyHistory
Run the script, execute your commands, then press F5 in the window that'll have appeared to display the logged keys.

Ok, will give this a try. Thanks!