Author Topic: How do I control Track Center from Joystick Button Press  (Read 2225 times)

Hazza

  • Guest
How do I control Track Center from Joystick Button Press
« on: February 19, 2019, 11:23:58 PM »
Hi very new to Voice Attack. I have read Frequently Addressed Topics re Using VoiceAttack to control a virtual joystick. Not sure what is meant by virtual joystick as well. Also watched good video on usage.

I have always used Button 5 on Saitek X52 Pro to centre track IR in all sims. Joystick Button 5 is mapped directly to Track IR. I have joysicks activated and testing recognises button presses but I cannot map button 5 anywhere to accept saying "Centre Track IR". When I tick "When I press button" in Edit a Command only key press options are presented. Pressing a button does not work.

I know I can do it via key presses but would prefer if possible via joystick button map.

Is it possible?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I control Track Center from Joystick Button Press
« Reply #1 on: February 20, 2019, 06:17:02 AM »
While the underlying systems for the keyboard are designed to allow simulating keypresses(I.E. setting the state of a given key in software), those for joystick devices are not.

This means that it is not possible to "fake" a button press as if it comes from an existing joystick device.

A workaround to this is to use a virtual joystick, which is a device driver that acts as if it's another physical joystick attached to your computer, but takes commands from software to set the buttons states.


So it is possible to send joystick button presses, but not from an existing device, and not without external software.
As pretty much all applications also support keyboard input for actions that accept joystick input, it's a whole lot simpler to just use that.

If you don't want to lose a physical key, you can try mapping the F13-F24 keys for applications that support it.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: How do I control Track Center from Joystick Button Press
« Reply #2 on: February 20, 2019, 10:44:05 AM »
It MIGHT be possible to get around this issue if you set up your joystick within the Steam Controller Configurator. This assumes you use Steam to launch the game and that the Configurator would recognize your joystick's input.

If these assumptions are valid, you could map a joystick button press to equate to key or mouse press using the Configurator (i.e., "real" joystick press triggers a "virtual" key/mouse press). Then that key or mouse press can be recognized by VA to do other things. Again though, if you're not using Steam or your joystick isn't recognized by the Configurator this won't work.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I control Track Center from Joystick Button Press
« Reply #3 on: February 20, 2019, 11:29:52 AM »
Not sure why you'd involve an external application here, VoiceAttack can already react to joystick button presses directly in this manner.

Unless you need to use more than two joystick devices at a time.

Hazza

  • Guest
Re: How do I control Track Center from Joystick Button Press
« Reply #4 on: February 20, 2019, 04:10:19 PM »
It MIGHT be possible to get around this issue if you set up your joystick within the Steam Controller Configurator. This assumes you use Steam to launch the game and that the Configurator would recognize your joystick's input.

I don't use Steam to launch programs normally - just where I have too which is CLOD. And I want a consistent approach for Track IR over all sims.

This means that it is not possible to "fake" a button press as if it comes from an existing joystick device.

If you don't want to lose a physical key, you can try mapping the F13-F24 keys for applications that support it.

Ok I will revert to key press.

I quick question the:
What is difference or use of "When I press button" in Edit a Command as compared to "When I press keys" in Edit a Command?

I have not seen in covered in docs or video unless I missed it. Is it to do with the virtual keyboard?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I control Track Center from Joystick Button Press
« Reply #5 on: February 20, 2019, 06:16:55 PM »
What is difference or use of "When I press button" in Edit a Command as compared to "When I press keys" in Edit a Command?

Quote from: VoiceAttackHelp.pdf page 18
Checking the box labeled, 'When I press keys' indicates to VoiceAttack that you want
to execute this command when pressing a keyboard shortcut.

Quote from: VoiceAttackHelp.pdf page 21
Checking the box labeled, 'When I press button' indicates to VoiceAttack that you
want to execute this command when pressing a joystick button, or a button
combination.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: How do I control Track Center from Joystick Button Press
« Reply #6 on: February 22, 2019, 06:47:29 PM »
Thanks for the additional input Pfeil. I misunderstood and thought that Hazza needed a way to get certain inputs from a device to be recognized by VA.

Hazza

  • Guest
Re: How do I control Track Center from Joystick Button Press
« Reply #7 on: February 23, 2019, 04:19:41 PM »
Ok understand a bit more. Got Track IR Centre working along with pause and release. Also got joystick button engaging centre as well to give me backup until I decide what I like.

Thanks for pointers Pfeil