MrArsGravis Posted December 8, 2021 Share Posted December 8, 2021 (edited) TLDR: How can I make an external (non-Thrustmaster) button press trigger something in TARGET? I've been using Home Fries's excellent and well-maintained CTS software (with Warthog HOTAS) for years now and it's been great so far. However, I'll be getting a Honeycomb Bravo soon for multi-engine capability, and then I'd also want to use its dedicated gear lever—even when I'm using the Warthog as the throttle—instead of having to use a multi-button combo on the Warthog set. Obviously, there should be multiple easy ways to configure that lever to also raise or lower the gear in DCS. But here's the problem: As those of you who use CTS will be aware, the gear-up/gear-down events in CTS also set a TARGET-internal GearState flag which changes the behavior of the TARGET script. I would like to toggle this flag when activating the separate gear lever, which I'll admit I thought was going to be easier than it is. I've been browsing around, but haven't found the answer yet: Is there some function or hack I can add to the TARGET scripts so it reads an external trigger? I initially (mistakenly, it seems) thought it would be straightforward to read keypresses from the keyboard to trigger events. Or is there some even more hacky way to inject what looks like a button press from the Warthog? I have VoiceAttack, which I thought would help, and I'm not above adding vJoy, Joystick Gremlin or whatever else it might take. Heck, if there's an automated TARGET --> Gremlin translator I might even try that and solve my issue in Joystick Gremlin entirely. However, I don't want to give up on CTS/TARGET entirely because they're continually doing work for all of us that I don't have to unnecessarily duplicate. Edited December 8, 2021 by MrArsGravis clarified use case Link to comment Share on other sites More sharing options...
Hempstead Posted December 8, 2021 Share Posted December 8, 2021 You’d have write your own USB firmware, or figure out another way to masquerade as one of TM’s USB controller. It’s a widely known “secret” for over 10 years. Link to comment Share on other sites More sharing options...
MrArsGravis Posted December 11, 2021 Author Share Posted December 11, 2021 After doing some more digging around, I found your old post, Hempstead, and I'm sure it's an impressive and powerful solution beyond my current capabilities. However, for my current (quite simple) problem/use case, I was actually able to get this running with a solution that don't seem too hack-y and uses only a few lines of code. If anyone is interested in reproducing this, I wrote a few more details in a reddit thread where I found someone else who had the same question. It uses a built-in TARGET function called RegisterGameCallback which enables inter-app communication via TCP. I couldn't have figured it out without reading some old posts by someone called Nicu on SimHQ (see reddit comment for details). Link to comment Share on other sites More sharing options...
Hempstead Posted December 12, 2021 Share Posted December 12, 2021 That should work. I didn’t know that function exist! Link to comment Share on other sites More sharing options...
Recommended Posts