WhiteMagic / JoystickGremlin

A tool for configuring and managing joystick devices.
http://whitemagic.github.io/JoystickGremlin/
GNU General Public License v3.0
321 stars 46 forks source link

Map to Keyboard Tweak #334

Closed amadeus closed 3 years ago

amadeus commented 3 years ago

Hello, I've been having a few issues using Map to Keyboard feature in IL2 due to what I think is caused by the release commands happening in the same order as they are pressed.

This creates issues when, for example binding flaps that depend on F to lower flaps and LShift+F to raise flaps. The Raise Flaps command ends up undoing itself due to the split second timing of F still being pressed when LShift is released.

Looking at the code, I was wondering if simply executing the release macro in reverse order would be a safe and quick way to fix this problem? (which as you can see is essentially what I did in this PR).

Unfortunately my Windows machine is not setup for development, so I was unable to test, and I also know jack shit about how Joystick Gremlin works under the hood, so there's a greater than 0 chance this won't work for other reasons that I may not fathom.

And if it is a valid fix, then the least I can do is help it along.

WhiteMagic commented 3 years ago

That's been an issue for a while and the fix is that easy, similar to what was discussed in #271. I mainly hadn't fixed it because I'd end up touching on this when I get to rework all actions for R14, but your fix is what I would have implemented for it anyhow.

I'll merge into the develop branch even though that is massively behind R14, however, I will have to deal with consolidating the two at one stage anyhow.