Author Topic: How to add additional "push-to-talk"-style keys/buttons  (Read 2395 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
How to add additional "push-to-talk"-style keys/buttons
« on: December 27, 2023, 01:17:17 AM »
The options on the "Hotkeys" tab of the VoiceAttack options window allow you to assign one key/button (combination) per input method.

If you need additional inputs for any of those methods, that is possible by using commands.

Note that you'll need to follow these instructions for each additional key/button (combination) of a given type; if you assign more than one key/button of a given type to a pair of commands, that would mean you need to press and release all of those keys/buttons together.
I.E. you can configure one pair of commands to be triggered by one set of keyboard keys, one set of joystick buttons, and one set of mouse buttons (and they will be independent of each other; you cannot configure a command to require multiple "When I press" options to be used simultaneously before they trigger), but not, for example, two sets of keyboard keys.

These steps can be used to create a "push-to-talk" input, or a "push-to-mute" input. If you already assigned these previously (either using the "Hotkeys" tab, or commands like these), under normal circumstances you'd want to make sure they're all configured for the same style of input (I.E. all of them "push-to-talk", or all of them "push-to-mute")


1. Click the icon on VoiceAttack's main window

2. Click "New Command"

3. Replace the default "New Command" (and the number, if there is one) with a unique name (given that you'll need two commands for this, you may want to append "press" to this name, so you can use "release" for the other one)

4. Disable (uncheck the box left of) the "When I say" option

5. Click "When I press keys", "When I press button", or "When I press mouse", depending on the input method you want to use (keyboard keys, joystick buttons, or mouse buttons)

6. Press the keys/joystick buttons you want to assign; if you are assigning mouse buttons, select the relevant buttons instead ("Forward" and "Back" are the side buttons on many mice)

7. For keyboard keys, make sure the "Do not allow key to be passed through" option is enabled; this will prevent the majority of applications from responding to this key (if you don't want that, don't enable this option)
Joystick buttons cannot be prevented from passing through (this is a Windows limitation)
For mouse buttons, make sure the "Do not allow button event to be passed through" option is not enabled; due to a limitation in the Windows mouse system, having this enabled would prevent detecting when the button is released

8. Make sure the "Shortcut is invoked only when all keys are released" or "Shortcut is invoked only when all buttons are released" option is not enabled

9. Click "OK"

10. Click "Other >", "VoiceAttack Action", "Start listening" (if you want VoiceAttack to stop listening when the keys/buttons are held down, I.E. "push-to-mute", choose "Stop listening" instead)

11. Click "OK"

12. Click "New Command"

13. Replace the default "New Command" (and the number, if there is one) with a unique name (if you appended "press" to the first command name, append "release" to this one)

14. Disable (uncheck the box left of) the "When I say" option

15. Click "When I press keys", "When I press button", or "When I press mouse", depending on the input method you want to use (keyboard keys, joystick buttons, or mouse buttons)

16. Press the keys/joystick buttons you want to assign; if you are assigning mouse buttons, select the relevant buttons instead ("Forward" and "Back" are the side buttons on many mice)

17. For keyboard keys, make sure the "Do not allow key to be passed through" option is enabled; this will prevent the majority of applications from responding to this key (if you don't want that, don't enable this option)
Joystick buttons cannot be prevented from passing through (this is a Windows limitation)
For mouse buttons, make sure the "Do not allow button event to be passed through" option is not enabled

18. Make sure the "Shortcut is invoked only when all keys are released" or "Shortcut is invoked only when all buttons are released" option is enabled

19. Click "OK"

20. Click "Other >", "VoiceAttack Action", "Stop listening" (if you want VoiceAttack to stop listening when the keys/buttons are held down, I.E. "push-to-mute", choose "Start listening" instead)

21. Click "OK"

22. Click "Done"

23. Test your new "push-to-talk" (or "push-to-mute") key/button (combination)



If you want to make these additional inputs available to all profiles, and/or if you are using a third-party (E.G. HCS Voice Packs) profile that cannot be edited, create a new profile before following the above steps, then after following the steps click the wrench icon on VoiceAttack's main window, click the ". . ." to the right of "Global Profiles", click the "+" button, select the profile you created, click "OK", click "OK", click "OK"
The profile will then automatically be included in any other active profile (editing it will still require you to make this profile the active profile first)

If you only want to make these additional inputs available to some, but not all profiles, instead of clicking the wrench icon, switch to the profile you want to make them available in, click the icon on VoiceAttack's main window, click "Options" near the top of the window, then on the "Profile General" tab, click the ". . ." button under "Include commands from other profiles" instead, and follow the same instructions as for the global profiles to assign your profile to automatically be included in the profile you are editing.
Repeat for each profile you want to make them available in.
« Last Edit: December 27, 2023, 05:03:53 AM by Pfeil »