Jump to content

Joy2vJoy (use off-position of buttons on Thrustmaster throttle)


pellelil

Recommended Posts

It have always annoyed me that I could not map the "off-positions" of the 2- and 3-way buttons on my Thrustmaster throttle. A two-way button will generate a "button-press" when toggled to one position, however when you toggle it to another position that "button-press" will simply go off, and it will not generate another button-press (hence nothing to map/bind). Likewise a 3-way button will only generate a "button press" in the up-position and another "button press" in its down-position, however it will not generate any "button-press" when put in its middle-position (e.g. the pinky-switch forward/aft will generate button-press 13/14, however nothing in its middle-position). I know you can handle this via Thrustmasters Target-software, however as your Target-profile boils down to a single virtual device (hence a finite/limited number of axis and buttons), I've always found it to be "too simple" for my taste (in this aspect the software for CH-products is much better). Also you can do it via various other 3rd party software, such as VoiceAttack or JoyToKey. However these are more complicated to setup, as you often have to create/use a specific profile for a specific aircraft, since they need to "send" specific key-combinations.

So back in 2019 I decided to write a small program that lets me do so via vJoy (that is a driver for up to 16 virtual joysticks, each with multiple axis and up to 128 buttons). Joy2vJoy is hard-coded to ONLY work with the Thrustmaster throttle and the vJoy driver is a requirement (vJoy is not bundled, but download links are listed below). I initially had plans to expand this program with support for additional devices and add scripting. At one point I had a development versions with LUA-scripting support, however it was not running reliable, so I scraped it. In its current form I have used this program with DCS since 2019 myself, and have never had any issues. The program is written to be light on CPU-usage, so your frame-rate in DCS is not affected, but I suggest you only enable "Update checkboxes" when testing how the software is working.

billede.png

If you haven't done so already you need to install vJoy (links below) and create a single virtual Joystick with at least 21 buttons (I simply made one with 128 buttons). In the enclosed manual (PDF-file) I show how this device is created, and how you can test it is working, using the programs installed with the vJoy driver (you only have to do this once). From that point you simply need to run Joy2vJoy prior to starting DCS (or whichever sim/game you want to use it with). The way it works you map your physical buttons to actions in DCS using the physical Thrustmaster throttle (as per usual). However to map-up the "off-positions" of the various 2/3-way buttons you in stead need to map up "button-presses" on the jVoy device to the action you want to perform when a physical button goes off. E.g. for the DCS AH64 I use the 3-way pinky switch on the throttle to control NVS-OFF (aft), NVS-NORM (middle/off) and NVS-FIXED (forward). The Pinky-switch forward/aft generates button press 13 and 14 on the phycial throttle, so I use theese buttons on the physical device to map-up NVS-FIXED/OFF. However I then use button 13 on my virtual vJoy device to map to NVS-NORM. It is a coincidence that it is also button 13 on the virtual device, so either use the table in the PDF-manual too see which virtual button-presses are linked to which physical-buttons, or simply check "Update checkboxes" in Joy2vJoy and see what happens when you press the physical buttons on your Thrustmaster throttle (which check-boxes are checked/un-checked). In the screen-shot above (both "Activated" and with "Update checkboxes" are enabled), the check-boxes in the left side of the screen represent the physical buttons on your Thrustmaster throttle, and the check-boxes in the right side represent the virtual buttons of the 1st vJoy device.

Download link for Joy2vJoy:
https://www.digitalcombatsimulator.com/en/files/3321311/

Links for the vJoy driver, both for usage with Joy2vJoy and/or the Streamdeck-vJoy plug-in:
https://github.com/njz3/vJoy/releases (as of now version 2.2.1.1)
https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1 (older version)

 

Version 1.03 (April 10th 2022)

  • Added virtual (Off) button 22, when Throttle Hat is centered.
  • Added short-cuts (e.g. "ALT+C" to toggle "Update checkboxes).
  • Added ToolTips to Physical/vJoy checkboxes (shown when hovering mouse ower these).
  • Added management of "Initial Status" profiles.
  • Enabled mirroring of Off-buttons
  • Enabled mirroring of Physical TM-Throttle buttons (and POV Hat)
  • Enabled mirroring of Physical TM-Joystick buttons (and POV Hat)

Version 1.02 (April 3rd 2022)

  • Its no longer necessary to press the "Activate" button after startup.
  • Added program arguments, so you can use "-Minimize" (without quotes) in your program short-cut, to start the program minimized.
  • Updated the manual with new download links, and describing the command-line arguments added in this version.
  • Only one instance running is allowed.

Version 1.01 (March 2022)

  • No need to toggle all buttons (on/off) of the physical Thrustmaster throttle at start-up.
  • Released here at DCS as a zipped-archive (to be copied where you want it).

Version 1.00 (2019)

  • Released as an installer (via a Thrustmaster FB-group).

Recorded video for the release of version 1.03 both explaining how to use the program in general, and what was added to version 1.03:

Beside using vJoy for the Joy2vJoy software I also have begun using vJoy with my Stream Deck (SD). I started to use Joy2vJoy when I got the DCS F18, and for the F18 I made an SD-profile for the F18 simply sending key-combinations from SD to DCS. However it was a drag finding out which keyboad-combinations that were in use in DCS, which I needed to define/use both in DCS and SD (given many keyboard combinations that DCS will acccept, cannot be generated by SD). So for my AH64 SD-profile I instead decided to use a plug-in for SD that lets my SD button-presses generate vJoy button presses. So as of now I have no less that 5 vJoy-devices (virtual Joysticks) defined. The first vJoy device is only used with Joy2vJoy (can't be shared with the SD plug-in). However the other 4 vJoy-devices (each with 128 buttons) are only used with the SD plug-in. Hence via this plug-in I have no less than 512 virtual buttons in total, that I can map between SD and DCS. Even though you define devices with 128 buttons, there might be programs/games that are only able to see/use the first 32 buttons (however DCS can see/use all 128 buttons on each device). Another bennefit of using this vJoy plug-in for SD over generating key-presses is that you can use multiple buttons at the same time. E.g. pressing two SD-buttons (or more) at the same time, I can both increase the lights for SIGNAL and PRIMARY in the AH64 at the same time. Had I used traditional key-combinations, I would first have to increase one, and then the other. Here below is a link for that plug-in for SD, and a link for a package I made with nearly 300 (button) graphic-files to use if you want to build an AH64 SD profile. In the zip-file for the latter you also get a full list of which actions you could choose to map to actions for the virtual devices 2-5 (4 devices each with 128 buttons):
https://github.com/ashupp/Streamdeck-vJoy
https://www.digitalcombatsimulator.com/en/files/3321046/


Edited by pellelil
Version history for version 1.03
  • Thanks 2

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

No there are no programming available, hence nothing to setup. I simply gives access to-/makes it possible to assign actions to the "off-positions" of the Thrustmaster throttle-buttons, so in DCS can assign actions to all 2/3-positions of your 2/3-way buttons.

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

Have just released version 1.02 with the following changes

  • Its no longer necessary to press the "Activate" button after startup.
  • Added program arguments, so you can use "-Minimize" (without quotes) in your program short-cut, to start the program minimized.
  • Updated the manual with new download links, and describing the command-line arguments added in this version.
  • Only one instance running is allowed

Edited by pellelil
Forgot something

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

Have just released version 1.03

  • Added virtual (Off) button 22, when Throttle Hat is centered.
  • Added short-cuts (e.g. "ALT+C" to toggle "Update checkboxes).
  • Added ToolTips to Physical/vJoy checkboxes (shown when hovering mouse ower these).
  • Added management of "Initial Status" profiles.
  • Enabled mirroring of Off-buttons
  • Enabled mirroring of Physical TM-Throttle buttons (and POV Hat)
  • Enabled mirroring of Physical TM-Joystick buttons (and POV Hat)

Recorded video for the release of version 1.03 both explaining how to use the program in general, and what was added to version 1.03:

 

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

First of all I expect that you unzipped all files bundled with the Joy2vJoy program to the same folder (it's own folder). Did you create vJoy device #1 with 128 buttons? Did you test that this device is working using vJoy Feeder/Monitor?

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

On 4/15/2022 at 12:39 PM, Jokletox said:

Hi ! 

I have this message when launch Joy2Joy :

joy2joy.jpg

@Jokletox In next version I've added a program-argument (you can add to the short-cut) which will suppress this message. The message is displayed if there is a mismatch between the version of vJoy driver and the version of the vJoy dll.

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

  • 3 weeks later...

Hi, Joy2vjoy is a great job, congratulations!
I have seen the video several times and carefully followed all the instructions, but DCS does not assign commands to virtual keys on the Vjoy device by clicking them in warthog, while clicking on the "Key / Button" drop-down menu the 128 keys are listed.If I assign the right virtual button from there (looking at the correct number on Juy2Vjoy), it assigns it, but then it doesn't work in game.

1 - I installed Vjoy V.2.2.0 (2.2.1 freezes at the end of the installation). I have assigned 128 keys to a virtal device and disabled the Force feedback effects and the configuration looks exactly like in the explanations.

2 -I tested Vjoy with feeder and monitor, and closed the programs before starting Joy2Vjoy (all Joy2Vjoy files are in the same folder as recommended). I also get the error (Warning v.joy Dll 536 and Driver version 544 doesn`t match) but everything starts perfectly.

3 I just check "Update checkboxes" and start DCS.

Everything looks the same as the video tutorial, but in the DCS options the Vjoy peripheral does not feels the virtual keys, even if the x, y, z and rz virtual axes  were assigned by default and I had to eliminate in the DCS axis assign folder because ingame they interfered with the joystick.

I don't understand what the wrong point is.

Greeting and good hunt.

vjij.jpg

j2vj.jpg

feed.jpg

Untitled-4.jpg

dcs-4.jpg

Link to comment
Share on other sites

On 5/7/2022 at 6:05 PM, Berto72 said:

Hi, Joy2vjoy is a great job, congratulations!
I have seen the video several times and carefully followed all the instructions, but DCS does not assign commands to virtual keys on the Vjoy device by clicking them in warthog, while clicking on the "Key / Button" drop-down menu the 128 keys are listed.If I assign the right virtual button from there (looking at the correct number on Juy2Vjoy), it assigns it, but then it doesn't work in game.

1 - I installed Vjoy V.2.2.0 (2.2.1 freezes at the end of the installation). I have assigned 128 keys to a virtal device and disabled the Force feedback effects and the configuration looks exactly like in the explanations.

2 -I tested Vjoy with feeder and monitor, and closed the programs before starting Joy2Vjoy (all Joy2Vjoy files are in the same folder as recommended). I also get the error (Warning v.joy Dll 536 and Driver version 544 doesn`t match) but everything starts perfectly.

3 I just check "Update checkboxes" and start DCS.

Everything looks the same as the video tutorial, but in the DCS options the Vjoy peripheral does not feels the virtual keys, even if the x, y, z and rz virtual axes  were assigned by default and I had to eliminate in the DCS axis assign folder because ingame they interfered with the joystick.

I don't understand what the wrong point is.

Greeting and good hunt.

2: On my sim-PC I run an older version of the vJoy driver, so I don't see the driver mismatch warning on startup. However I do see it on my test-PC which runs a newer version of vJoy. But as you say yourself, the program is running fine nevertheless. As stated in a previous post, in the next version I have added a program-argument which will suppress this warning (will not display it) if this argument is added to the short-cut you use to start Joy2vJoy.

3: Its not necessary to enable "Update checkboxes" while running Joy2vJoy. This is just a "debug-thing", so you can visually see that Joy2vJoy is working as it should. Whether this checkbox is enabled or not, Joy2vJoy will "do its thing" as soon as it is running and it is activated. However if you think there is an issue where Joy2vJoy is not working as it should, you can use it to test that all is working. When you toggle the buttons, and switches on the physical throttle you should both see that the checkboxes on the left (representing the physical throttle) and the checkboxes on the right (representing the virtual device) should switch checked/unchecked.

E.g putting the pinky-switch forward the Left (physical) "13" checkbox should be checked, while the Right (virtual) "13" checkbox will be unchecked. Putting the pinky-switch in the middle both the Left (physical) "13" and "14" checkbox should be unchecked, while the Right (virtual) "13" checkbox will become checked. Putting the pinky-switch aft the Left (physical) "14" checkbox should be checked, while the Right (virtual) "13" checkbox will be unchecked.

DCS will always assign the axis for all of your devices (both the physical and virtual), so this is why you have to unassign your vJoy-device axis for pitch, roll, yaw and rudder, for each module (aircraft/helicopter) you fly in DCS, for each vJoy device you have created. This is also mentioned in the video (link below contains a time-specification to the place where this is mentioned):

In the video I mention how you should map up actions to the off-positions using your vJoy device. DCS will have to see a change in order to map up a button, hence it has to switch from OFF to ON. So in order for DCS to see you are mapping up the virtual button 13, it has to be OFF before you try to map it up. So move your pinky-switch either forward or aft (and leave it forward/aft) so virtual button 13 is OFF, before you try to have DCS assign this button.

Then in DCS you assign the virtual buttons, just as you assign physical buttons. If you have multiple vJoy devices you have to make sure you select the column for the correct device. As you can see in the video (link with time-code below), I search for "NVS" for the AH-64D Pilot, and then I first map up the two physical buttons (using the "Throttle" column) to map up physical buttons 13 and 14 (pinky forward/aft) to NVS-OFF and -FIXED. I then leave the pinky in the forward position (also mentioned in the video). Then I find the (correct) vJoy column, and double click the "PLT NVS MODE Switch - NORM" cell. When the window opens I simply moves the pinky-switch to the middle position (which will make the virtual button 13 going "ON). Hence DSC will automatically detect which button is switched from OFF to ON. In your screen-shot it appears you are trying to manually tell it which button to use. This is not necessary, DCS can detect this.

For this to work, Joy2vJoy MUST be running while you run DCS, and it MUST be activated. Please verify as stated above that the (Left) virtual button "13" is ON (checked) when the pinky-switch is in the middle-position, and OFF (unchecked) when the pinky-switch is either forward or aft.

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

12 hours ago, pellelil said:

 

In the video I mention how you should map up actions to the off-positions using your vJoy device. DCS will have to see a change in order to map up a button, hence it has to switch from OFF to ON. So in order for DCS to see you are mapping up the virtual button 13, it has to be OFF before you try to map it up. So move your pinky-switch either forward or aft (and leave it forward/aft) so virtual button 13 is OFF, before you try to have DCS assign this button.

Then in DCS you assign the virtual buttons, just as you assign physical buttons. If you have multiple vJoy devices you have to make sure you select the column for the correct device. As you can see in the video (link with time-code below), I search for "NVS" for the AH-64D Pilot, and then I first map up the two physical buttons (using the "Throttle" column) to map up physical buttons 13 and 14 (pinky forward/aft) to NVS-OFF and -FIXED. I then leave the pinky in the forward position (also mentioned in the video). Then I find the (correct) vJoy column, and double click the "PLT NVS MODE Switch - NORM" cell. When the window opens I simply moves the pinky-switch to the middle position (which will make the virtual button 13 going "ON). Hence DSC will automatically detect which button is switched from OFF to ON. In your screen-shot it appears you are trying to manually tell it which button to use. This is not necessary, DCS can detect this.

For this to work, Joy2vJoy MUST be running while you run DCS, and it MUST be activated. Please verify as stated above that the (Left) virtual button "13" is ON (checked) when the pinky-switch is in the middle-position, and OFF (unchecked) when the pinky-switch is either forward or aft.

First of all, thank you for your response and support.

From the test, I believe Joy2vjoy works perfectly.


I deliberately tried to enter the commands through NVS to try to understand where I am wrong:
I assigned the NVS FIXED and NVS OFF commands on Trhottle device then, from forward (or after), double clicked NVS NORMAL on Vjoy device to assign the virtual button with the change of state to middle, but this action is not detected by DCS.

Your program incredibly values Hotas Wartog far more than factory software, so it would be a shame to give up.

test.jpg

dcs.jpg

Link to comment
Share on other sites

12 hours ago, Berto72 said:

First of all, thank you for your response and support.

From the test, I believe Joy2vjoy works perfectly.


I deliberately tried to enter the commands through NVS to try to understand where I am wrong:
I assigned the NVS FIXED and NVS OFF commands on Trhottle device then, from forward (or after), double clicked NVS NORMAL on Vjoy device to assign the virtual button with the change of state to middle, but this action is not detected by DCS.

Your program incredibly values Hotas Wartog far more than factory software, so it would be a shame to give up.

Strange? From your screen-shot Jov2vJoy is behaving just as it should regarding the logic for the pinky-switch. So I am puzzled why DCS cannot see these changes.

You CAN NOT run the vJoy Feeder application at the same time you run Joy2vJoy. However you can run the vJoy Monitor application alongside Joy2VJoy. So please run Joy2vJoy and the vJoy Monitor application at the same time. When you do, and you toggle the pinky-switch to its different positions, do you see button 13 changing in the vJoy Monitor application?

  • Thanks 1

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

2 hours ago, pellelil said:

Strange? From your screen-shot Jov2vJoy is behaving just as it should regarding the logic for the pinky-switch. So I am puzzled why DCS cannot see these changes.

You CAN NOT run the vJoy Feeder application at the same time you run Joy2vJoy. However you can run the vJoy Monitor application alongside Joy2VJoy. So please run Joy2vJoy and the vJoy Monitor application at the same time. When you do, and you toggle the pinky-switch to its different positions, do you see button 13 changing in the vJoy Monitor application?

 Hi, i launched Joy2Vjoy and Vjoy Monitor and run the test, there is no dialogue between the two programs: 

test vjoy.jpg 

 

Link to comment
Share on other sites

SOLVED ! 🙃

Hi, I found the solution, hope my feedback will be useful to your fantastic  program.


As mentioned, I had Vjoy 2.2.0 version because the 2.2.1 freezed at the end of the installation (even if it worked) while the 2.2.0 finish the installation in a clean way.


After numerous attempts (more virtual joysticks, some with axis, others without, and so on...) I noticed that in your video you have J2Vjoy v 1.03, the latest one, but VJoy version 2.1.8.

So i  installed Vjoy version 2.1.9, and everything works fine. Then, for scientific validity, 2.2.0 and 2.2.1 again, but Joy2Vjoy does not dialogue with these latest versions (maybe because 2.2.0 introduces many more virtual axes?).
Then reinstalled the 2.1.9 and repeated the cycle several times:

Joy2Vjoy works correctly up to Vjoy version 2.1.9 (this with or without freeze at the end of the installation).

Good hunt!

Berto72

Link to comment
Share on other sites

Thanks for the feed-back @Berto72 and glad to hear you got it working !!!

I had planed to do some further investigation and in the weekend and make the version of vJoy I am using available for you, as it clearly appeared to be an issue between the version of vJoy driver and the version of the dll Joy2vJoy is using to communicate with the vJoy (however didn't have the time). As time allows I will look further into this, and again thanks for the feedback.

Pelle

Pelle Liljendal

(MooseMan)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...