Author Topic: Add a global joystick button option to enable/disable keyboard shortcuts  (Read 3703 times)

TickTock

  • Guest
I use a toggle on my HOTAS to disable voice command interpretation and wish I could make it also disable keyboard shortcuts - basically allowing me to have one switch which enables/disables ALL VA functions.  Basically copy all the options you have put in for the "Global Listening Joystick Button" to a new "Global Key Processing Joystick Button" so we can choose to map both to the same button or to separate toggles if desired.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
If you don't want to wait for the feature:

If you make toggle on the "everything off" position, you could set a command to start when you press the button containing:
Code: [Select]
Stop VoiceAttack listening
Disable Hotkeys
Start Loop While : [{STATE_JOYSTICK1BUTTON:1}] Equals '1'
End Loop
Start VoiceAttack listening
Enable Hotkeys
This way the command idles in the background until you switch the toggle back off, which re-enables everything.


If you want the toggle the other way around, you'd probably be best off with a command constantly looping in the background to monitor the status.

E.G.
Code: [Select]
Start Loop While : [{EXP:1=1}] Equals '1'
    Begin Text Compare : [{STATE_JOYSTICK1BUTTON:1}] Equals '1'
        Start VoiceAttack listening
        Enable Hotkeys
    Else
        Stop VoiceAttack listening
        Disable Hotkeys
    End Condition
End Loop

TickTock

  • Guest
Thanks.  This is a level up from anything I've attempted before but I'll give it a go.  I like the first option - not like VA is doing anything else while I have keyboard and mic muted so it may as well hang in a loop waiting until I'm ready for it to come back.