Author Topic: PTT Keybind Problems  (Read 2595 times)

McNubblet

  • Newbie
  • *
  • Posts: 2
PTT Keybind Problems
« on: March 10, 2024, 09:44:46 PM »
Heyas,

Hopefully someone can point out a glaringly obvious mistake I'm making with my config, I'm very new to VA :)

I currently use different keybinds for PTT ingame voip (CAPSLOCK), and PTT Discord (MOUSE4).

Issue #1 - When I set the Global Hotkey "Push to not listen Caps Lock", VA is not suspending listening when holding down caps lock.  When setting the hotkey, it recognises the key press and sets it correctly, it just doesn't work.  Setting the Mouse Click Recognition to "Back Down Stop Listening" works as expected.

Issue #2 - The global hotkeys are "resuming listening" even if listening was previously disabled.  I get that this is probably expected behaviour (or should be for a toggle action anyways), but when "hold to disable" type functionality is selected, I would expect it see that it's already not listening, so don't turn it back on when the hotkey release action occurs? 

I tried to get around #2 with a command, however I can only see the option to bind to a key press+release/click event, not a button hold event and a separate release event.  I do see the option to "repeat command while buttons are held down", however I don't see an option to select "listening state" as a variable for an if condition.

Any help anyone can give is greatly appreciated.

Cheers,
Nub


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: PTT Keybind Problems
« Reply #1 on: March 11, 2024, 01:47:28 AM »
Issue #1 - When I set the Global Hotkey "Push to not listen Caps Lock", VA is not suspending listening when holding down caps lock.  When setting the hotkey, it recognises the key press and sets it correctly, it just doesn't work.
What do you mean by "it just doesn't work"?

I tried to get around #2 with a command, however I can only see the option to bind to a key press+release/click event, not a button hold event and a separate release event.  I do see the option to "repeat command while buttons are held down", however I don't see an option to select "listening state" as a variable for an if condition.
As mentioned in this topic, you'd normally use two separate commands.

The "Repeat command while buttons are held down" is not intended for this. It executes the actions within your command over and over again in a loop, as long as the button(s) are held down.

The listening state can be checked using the "{STATE_LISTENING}" token.


Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer, which contains information on VoiceAttack's features.

These topics may also be of use, in addition to the official documentation:
Control flow (If, Else, ElseIf, Loop, Jump) basics
Variables and tokens summed up

McNubblet

  • Newbie
  • *
  • Posts: 2
Re: PTT Keybind Problems
« Reply #2 on: March 11, 2024, 07:57:20 PM »
What do you mean by "it just doesn't work"?

When I hold down the Caps Lock key, VA doesn't stop listening.

Really helpful info.

Thanks very much for this - I think I can see a way around the problem now.