Jump to content

Need help setting up push to talk key on TM Warthog


Recommended Posts

I just received my Warthog today, set up pretty much everything without using the T.A.R.G.E.T software. I don't really like using joystick software cause I always feel like it's quite complicated and I don't need it to get the job done.

 

Now, the voice com software that I use doesn't support joystick PTT key. So, I gotta to use T.A.R.G.E.T and assign a joystick key into a keyboard key . I turned one of the Joystick buttons into caps lock for PTT, it worked just fine. However, it ended up the virtual caps lock key was the only one that was working, while other axis and buttons were unresponsive.

 

I reckon I'd have to compose a completely new joystick profile entirely in order to get it to work? Or, is there any way I could simply set up one button without having to mess with other keys?

Link to comment
Share on other sites

Now, the voice com software that I use doesn't support joystick PTT key. So, I gotta to use T.A.R.G.E.T and assign a joystick key into a keyboard key .

 

I think AutoHotkey might be exactly what you're looking for. I've never used it, but I think people solve similar tasks in order to avoid software like TARGET.

Link to comment
Share on other sites

I have used Autohotkey to do this in the past. (Will get around to sorting out a voice activated system again sometime). Here is the code i used (written using the free SciTE4Autohotkey editor):

 

 

 

1Joy2:: ; y Joy x , y= controller ID number in windows, x= joy button number

 

KeyWait, 1Joy2 ; Controller 1 is my TM Warthog Throttle. Button 2 is my mic switch pressed in.

 

send {v} ; Send "v" to issue VAC to arm itself, ready for speech.

 

return

 

 

 

A quick explanation:

 

Basically the script waits until I press button 2 on my joystick (controller 1) and then it sends a V key press. I had the key V set up in my voice activation software to activate the PTT.

 

I use a similar script to control my Trackir re-centre and pause commands at the moment.

 

I know it looks a bit complicated but once set up it works well so its worth pursuing.

 

1. Install Autohotkey and SciTE4Autohotkey.

2. Write your script using SciTE4Autohotkey. Make sure you have the correct controller number and your desired joystick button you want to use for PTT

3. Compile it.

4. Run the compiled .exe script when you play DCS World.

 

Regards,

Milli


Edited by Milli
  • Like 1
Link to comment
Share on other sites

I just received my Warthog today, set up pretty much everything without using the T.A.R.G.E.T software. I don't really like using joystick software cause I always feel like it's quite complicated and I don't need it to get the job done.

 

Its not that complicated and you will need to program it for something eventually.

 

When you use Target and run a profile, Target removes the Joystick and Throttle HID devices. In its place it creates a single, combined joystick/throttle combination called "Thrustmaster Combined".

 

So in something like DCS, the default behavior is that DCS expects two devices, and all the keys are mapped for you. Running a profile in Target then breaks this - because the two devices are removed.

 

You can disable the deletion of the the Joystick and Throttle devices, and you can, if you want, delete them from the original device, and reprogram their output with the "Thrustmaster Combined" device.

 

And here is the profile:

[color=#1e90ff][b]include[/b][/color] [color=#a52a2a]"target.tmh"[/color]
[color=#32cd32]//program startup[/color]
[color=#1e90ff][b]int[/b][/color] main()
{
   [color=#32cd32]// When run, both the Joystick and the Throttle remain as separate DX devices[/color]
   [color=#32cd32]// the "Thrustmaster Combined" device is also created[/color]
   Configure(&Joystick[color=#ffffff],[/color]MODE_FILTERED); [color=#32cd32]// Filtered, can disable original in int EventHandle() below[/color]
   Configure(&Throttle[color=#ffffff],[/color]MODE_FILTERED); 

   [color=#1e90ff][b]if[/b][/color][color=#ffffff]([/color]Init(&EventHandle)) [color=#1e90ff][b]return[/b][/color] [color=#ffffff]1[/color]; [color=#32cd32]// declare the event handler, return on error[/color]
   
   [color=#32cd32]// add initialization code here    [/color]
   MapKey(&Joystick, TG1, 0); [color=#32cd32]// This disables TG1 for the "Thrustmaster Combined" device                        [/color]
   MapKey(&Joystick, S2, [color=#a52a2a]'a'[/color]);  [color=#32cd32]// single keypress[/color]
   
   MapKey(&Throttle, LDGH, [color=#a52a2a]'b'[/color]); [color=#32cd32]// single keypress[/color]
   MapKey(&Throttle, APENG, DX1); [color=#32cd32]// This is the DX1 button of the "Thrustmaster Combined" device[/color]
   
   [color=#32cd32]// All buttons not explicitly defined here inherit defaults in Thrustmaster Combined[/color]
                        
}

[color=#32cd32]//event handler[/color]
[color=#1e90ff][b]int[/b][/color] EventHandle[color=#ffffff]([/color][color=#1e90ff][b]int[/b][/color] type, [color=#1e90ff][b]alias[/b][/color] o, [color=#1e90ff][b]int[/b][/color] x)
{
   [color=#32cd32]// To disable buttons on the original Joystick and Throttle devices, add here[/color]
   [color=#1e90ff][b]if[/b][/color](&o == &Joystick & !(o[color=#ffffff][[/color]S2])) GameOutput(&o, x, o[color=#ffffff][[/color]x]); 

   [color=#1e90ff][b]if[/b][/color](&o == &Throttle & !(o[color=#ffffff][[/color]LDGH]|o[color=#ffffff][[/color]APENG])) GameOutput(&o, x, o[color=#ffffff][[/color]x]); 
 
   DefaultMapping(&o, x);
}

You can change as needed to suit your requirements, but the upshot is that the two original Joystick and Throttle devices remain with this profile, and only the keys you program are changed from the defaults.

 

So you can surgically change what you want.

 

Be aware that you might get double button presses in some apps. In the above example TG1 of the Joystick device is active, but its not in "Thrustmaster Combined" ("0" disables in the config). However TG2 is active on both - so two directx button presses will occur, one on the Joystick device, one on the "Thrustmaster Combined" device.

 

Run the profile and then look at the output with the Target Device Analyzer.


Edited by Thermal
  • Like 1
Link to comment
Share on other sites

If you dont want/like use TARGET use a simple keymapper as Joy2Key or Xpadder for PTT.

 

Easy to set in graphical GUI, few computer resources usage (less than 100kb against Gb memory of other soft), can be started after the game, reconfigured "on-the-fly".

 

Simple solution for a single keypress problem. ;)


Edited by Sokol1_br
  • Like 1
Link to comment
Share on other sites

You can also prevent TARGET from creating the combined controller at all by changing

if(Init(&EventHandle)) return;

to

if(Init(&EventHandle, CREATE_KEYBOARD+CREATE_MOUSE)) return;

I have not tested this with the newest TARGET release though.

Link to comment
Share on other sites

Thank you guys for the help! I finally get it worked after using Autohotkey.

 

That one key is all i needed so I don't really wish to get too deep into TARGET. But I'll definitely take note of what you guys mentioned regarding to it, just in cause I'd need to use it in the future. :)

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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