Jump to content
Sign in to follow this  
Leftie

Getting the wrong key-order from Thrustmaster HOTAS Warthog

Recommended Posts

First of all, apologies if this issue has already been brought up and resolved. I did some googling and BI Forum searches, but couldn't find any relevant threads.

I'm trying to adapt the Thrustmaster HOTAS Warthog to work with A2:OA, and am running into some issues.

In A2, I've configured

Flaps Up -> R_CTRL+i
Flaps Down -> R_CTRL+k

And then I set up the following events in T.A.R.G.E.T:

FLAPD
Press -> R_CTL k
Release -> R_CTL i

FLAPU
Press -> R_CTL i
Release -> R_CTL k

Aside from the fact that this needs to be used with some patience (waiting for the flaps to move between steps), it should - in essence - work.

It doesn't.

Whenever I toggle the HOTAS Flaps switch, nothing happens.

When I went into the A2 Controls config to check and try to reset the flaps control settings, the apparent problem showed itself:

Whenever I try to use the HOTAS Flaps switch to configure the Flaps Down function, A2 does not register it as R_CTRL + k, but rather as k + R_CTRL. (And similarly for the Flaps Up function, of course.)

The Event Tester in T.A.R.G.E.T. shows

Key Press: RCTL
Key Press: K
Key Release: K [31ms]
Key Release: RCTL [33ms]

So apparently, input ought to be sent in the correct order.

Has anyone else seen this behaviour, and does anyone know of a way to resolve this problem?

Edited by Leftie
Changed the title to reflect that the problem is solved.

Share this post


Link to post
Share on other sites

I can't help you but man I sure wish I still had my TM HOTAS setup.

1st thing I thought when I saw the aviation side of A2/CO

Share this post


Link to post
Share on other sites

Have you tried setting up the Warthog from within A2 without using T.A.R.G.E.T. at all? Also, ist this Code correct? I must admit that I haven't really tried T.A.R.G.E.T. out yet - I'm using a TM Cougar and have grown quite fond of its programming utility "Foxy" over the years, so I installed T.A.R.G.E.T. only out of curiousity and not because I needed it. Anyway, with Foxy you would use brackets for "R_CTRL + k", so the syntax would look like this = "{R_CTRL + k}"

Share this post


Link to post
Share on other sites
Have you tried setting up the Warthog from within A2 without using T.A.R.G.E.T. at all?

Well, yes and no. I've managed to do most things directly in A2s config, but there is no way to what I want with the HOTAS Flaps switch without using T.A.R.G.E.T. The reason is that the MVR position needs to trigger either flaps up or flaps down, depending on the previous position of the switch.

Also, ist this Code correct?

No, it was just pseudo-code in order to explain my setup in simple terms. Here's the actual script code:

MapKeyIOUMD(&Throttle, FLAPU, PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i');
MapKeyRIOUMD(&Throttle, FLAPU, PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k');
MapKeyIOUMD(&Throttle, FLAPD, PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k', PULSE+R_CTL+'k');
MapKeyRIOUMD(&Throttle, FLAPD, PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i', PULSE+R_CTL+'i');

Share this post


Link to post
Share on other sites

Hmm, have you tried changing the type event to something else than "pulse" yet? Might need a "hold" argument for it to work, or "Press and Release"

Share this post


Link to post
Share on other sites
Hmm, have you tried changing the type event to something else than "pulse" yet? Might need a "hold" argument for it to work, or "Press and Release"

Nope, haven't tried that, but I don't imagine it would help. As I stated in my first post, the Event Tester shows what seems to be the proper behaviour.

The "hold" type event is used for keys which should be held down for as far as the joystick button is engaged (such as an MG trigger). This is not the case for the flaps.

Configuring it as two "press"- and "release"-type events also seems counterintuitive, since what I want to emulate is that the fairly normal key-combination CTRL+k is pressed, and then immediately released. Unless I've misunderstood something fundamental, that is precisely what the pulse action does. If the length of time for which the combination is held is the problem, then I could simply increase the pulse time setting in order to achieve the same goal.

Share this post


Link to post
Share on other sites

@KillaALF: I apologize for the brusqueness of my previous reply. I realize that I'm the one asking strangers for help, and I do appreciate all the help I get.

I took your advice about the "press" and "release" type events, and set up each switch action to trigger four separate events, in order to simulate a slower execution of a CTL+key pulse.

For example, here's what happens when I switch to the FLAPD position:

Immediately: R_CTL is pressed

30ms later: k is pressed

60ms after that: k is released

30 ms after that again: R_CTL is released

This actually works! :yay:

I do, however, consider it a workaround (and a cumbersome one at that), so I'll be looking into playing with the different timers in order to find out if that is the only thing preventing me from using a "pulse" type event.

For those who are interested, here's the current script code for the different flaps functions:

MapKeyIOUMD(&Throttle, FLAPU, CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL));
MapKeyRIOUMD(&Throttle, FLAPU, CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL));
MapKeyIOUMD(&Throttle, FLAPD, CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'k', D(60), UP+'k', D(30), UP+R_CTL));
MapKeyRIOUMD(&Throttle, FLAPD, CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL), CHAIN( DOWN+R_CTL, D(30), DOWN+'i', D(60), UP+'i', D(30), UP+R_CTL));

Edited by Leftie
Cleared up a misunderstanding about the "delay" value.

Share this post


Link to post
Share on other sites

Huh? No apology was needed, I did not think your reply was brusque at all. Glad you got it working. Have you tried it with single keys yet, say "U" for flaps up and "D" for flaps down? Maybe this would work with the "pulse" type event, you'd just have to find 2 keys that are not already taken.

Share this post


Link to post
Share on other sites

Ok, no harm done, then. I'm glad :)

Yes, pulse events with single keys seem to work OK. The problem only arises once I use modifier-keys (Ctrl, Alt and Shift). Because of the number of keys (not to mention some of the double-clicks) that are needed in A2, it's not really feasible to use only single keys.

I know from experience, that other games do not have an issue with modifier-keys and "pulse" events, so I'm forced to conclude that the problem only occurs because of how A2 handles key-presses.

I've played around a lot with timings now, and I can reproduce the same behaviour as the "pulse" events, by setting the pause between the event which presses Ctrl and the event which presses another key, low enough. The "pulse" events (which are basically preprogrammed "press" and "release" events) seem to set this pause as low as 1ms.

Here are my findings with regards to pause-length between modifier-key press and other key press:

<5ms: A2 consistently reports the keys in the wrong order.

5ms>20ms: A2 sometimes gets it right, but it's highly inconsistent.

>30ms: A2 consistently reports the intended order of key presses.

My recommendation to others who want to configure a T.A.R.G.E.T. compatible controller for use in A2, is to set the pause between modifier-key press and normal key press to at least 30ms. It may be that the response-time is dependent on e.g. CPU usage (a developer could tell us if this is the case or not), so you may want to give yourself a little more leeway, just to be on the safe side.

Share this post


Link to post
Share on other sites

Whats the warthog like? I wanna buy one as I currently have no stick.... is it worth the vast amount of money?

Share this post


Link to post
Share on other sites
Whats the warthog like? I wanna buy one as I currently have no stick.... is it worth the vast amount of money?

Whether or not it's worth it will always be subjective, but I can tell you that I'm very happy with mine.

The stick itself is tight as hell and just oozes quality. (All my previous experience is from owning simple joysticks from Saitek and Logitech.) There is some sideways slack in the throttle-sticks, but it doesn't really affect anything.

Bear in mind though, it is a replica stick, which means all the fancy extra buttons on the throttle base, are copied from the A10-C and labeled according to their original functions. This does make it somewhat less generic, but even if you end up not using any of those switches, the HOTAS setup has a metric buttload of keys, hats and switches to configure.

I say, if you can afford it, and are in the market for a HOTAS setup, go for it :rthumb:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×