Author Topic: How Do I Button Press Joysticks  (Read 23120 times)

Outlawstar

  • Posts: 1
How Do I Button Press Joysticks
« on: June 18, 2016, 12:20:25 AM »
I just purchased Voice Attack today and I have them enabled when I test them they read just fine but unfortunately I can't get it to register a button press for the death of me. Is there a way to get voice attack to input direct keys from joystick ?

I am using a Logitech GT Steering wheel and  a T-Flight HOTAS

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How Do I Button Press Joysticks
« Reply #1 on: June 18, 2016, 08:53:07 AM »
By "have them enabled", do you mean you've added them using the "Joystick Options" in the VoiceAttack "Options" screen("General" tab)?

In the latest beta(v1.5.8.27), button presses work fine. Note that POV hats don't register as buttons.

Zordah

  • Guest
Re: How Do I Button Press Joysticks
« Reply #2 on: July 12, 2016, 03:46:11 AM »
I'm in the same boat.
I have set up my Thrustmaster T.Flight HOTAS X in Voice Attack 1.5.8 and when I test the joystick it registers when I press the buttons.  I can press button 7 and button 11 and VA knows and lists both buttons as being pressed.

Now I want to set up a macro that when I say a phrase it simulates pressing button 7 + button 11.
The recorder does not register the buttons as being pressed they are just ignored.

Does this mean I *have* to map the game commands to keypresses and use those instead of being able to use the joystick buttons?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How Do I Button Press Joysticks
« Reply #3 on: July 12, 2016, 06:28:57 AM »
There is no native API to simulate button presses on a joystick.

For keyboard and mouse, all HID devices that register as either of those devices "feed" a single tracked state, which can be altered simply by telling Windows that said state should change.

Joysticks on the other hand require a custom driver that fakes an entire device being present, which is much more complex.

Does this mean I *have* to map the game commands to keypresses and use those instead of being able to use the joystick buttons?
Currently, yes. However, as even the smallest keyboard should have at least 78 keys, with a number of modifiers(Shift, Ctrl, Alt, or even RShift, RCtrl, and RAlt, if your game supports them), I would assume that's workable.

Zordah

  • Guest
Re: How Do I Button Press Joysticks
« Reply #4 on: July 13, 2016, 12:12:44 AM »
Yeah that's what I did and it works well.

It was just confusing that if VA could detect the joystick button events why couldn't it simulate them just like with the keys and mouse clicks ;)

J. Calvert (Joshua)

  • Newbie
  • *
  • Posts: 30
Re: How Do I Button Press Joysticks
« Reply #5 on: July 13, 2016, 01:05:55 AM »
Does this mean I *have* to map the game commands to keypresses and use those instead of being able to use the joystick buttons?

Some games (like Elite Dangerous) allow 2 keybindings for one action. As an example for lowering the landing gear I use the "L" key and a button on my joystick. My VA-command presses the "L" key so i have 3 options to lower the gear: pressing L, pressing joystick button or saying "Lower gear"

Jackie 8oy

  • Guest
Re: How Do I Button Press Joysticks
« Reply #6 on: July 26, 2016, 03:30:35 AM »
So there is no way to use a button from an other device and I have to use another app like joy2key?

Backround: I am driving iracing with an oculus rift and use an app called "Digital Race Engineer" (DRE) to execute commands via VA.

https://www.youtube.com/watch?v=Y-EuApbgytY

I also have buttons on my wheel which I want to use as backup, in case that the voice recognition doesn't work. An example.

If I say "break bias front", VA send the command Ctrl+E to iracing where I mapped Ctrl+E as break bias one click to the front. That works fine.
But I really would like to have that I can map a button of my wheel for the command "break bias one to the front" in iracing and would like to have that VA execute this button when I say "break bias front".

But I can't choose a button in VA for executing a command. Is that something that might come in the near future or will I have to use a sceond app, that maps my buttons to keys?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How Do I Button Press Joysticks
« Reply #7 on: July 26, 2016, 04:13:52 AM »
So there is no way to use a button from an other device
There is. Input, I.E. sending joystick button presses to VoiceAttack, is built-in. Output, I.E. sending joystick button presses from VoiceAttack to another application, is not.


You need to register up to two "Joystick devices"(Anything using DirectInput) in the "Joystick Options" under the "General" tab in the "Options" menu.



When you've done that, you can use "When I press button" to trigger commands using buttons on those devices. This is not mutually exclusive with speech, you can use any combination of speech,keyboard keys, joystick buttons, and mouse buttons.

Jackie 8oy

  • Guest
Re: How Do I Button Press Joysticks
« Reply #8 on: July 26, 2016, 04:35:37 AM »
Thanks. It would be nicer if VA could send the button command, but this workaround will do it also and I didn't thought this way before.