Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Getting the wrong key-order from Thrustmaster HOTAS Warthog

  1. #1

    [Workaround found] Getting the wrong key-order from Thrustmaster HOTAS Warthog

    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

    Code:
    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:

    Code:
    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

    Code:
    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?
    Last edited by Leftie; May 5 2011 at 15:07. Reason: Changed the title to reflect that the problem is solved.
    Dyslectics of the world, untie!

  2. #2
    Sergeant Westsailor's Avatar
    Join Date
    Apr 21 2011
    Location
    On my sailboat in Guatemala
    Posts
    101
    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
    IBM Lenovo ThinkPad W500, XP sp3, 2.53 Ghz Dual Core, 4 Gb ram, ATI FireGL V5700, 500 Gb 7200 rpm HD, Creative Audigy 2ZS

  3. #3
    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}"

  4. #4
    Private First Class Leftie's Avatar
    Join Date
    Mar 30 2008
    Location
    Norway
    Posts
    11
    Author of the Thread
    Quote Originally Posted by KillaALF View Post
    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.

    Quote Originally Posted by KillaALF View Post
    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:

    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');

  5. #5
    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"

  6. #6
    Private First Class Leftie's Avatar
    Join Date
    Mar 30 2008
    Location
    Norway
    Posts
    11
    Author of the Thread
    Quote Originally Posted by KillaALF View Post
    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.

  7. #7
    Private First Class Leftie's Avatar
    Join Date
    Mar 30 2008
    Location
    Norway
    Posts
    11
    Author of the Thread
    @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!

    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:
    Code:
    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));
    Last edited by Leftie; May 5 2011 at 15:06. Reason: Cleared up a misunderstanding about the "delay" value.

  8. #8
    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.

  9. #9
    Private First Class Leftie's Avatar
    Join Date
    Mar 30 2008
    Location
    Norway
    Posts
    11
    Author of the Thread
    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.

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


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •