Hmmm...
switching from a DXInput event to a keystroke didn't change the behaviour, and the same problem was present in the latest build of the 2.3 beta, which squashed a similar bug.
Here's my script:
Code:include "target.tmh" int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&Joystick, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&T16000L, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); Configure(&TFRPRudder, MODE_EXCLUDED); Configure(&TWCSThrottle, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; SetKBRate(32, 50); SetKBLayout(KB_ENG); MapKey(&T16000, H1U, PULSE+DXHATUP); MapKey(&T16000, H1R, PULSE+DXHATRIGHT); MapKey(&T16000, H1D, PULSE+DXHATDOWN); MapKey(&T16000, H1L, PULSE+DXHATLEFT); MapAxis(&T16000, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, JOYX, 0, 0, 0, 3, 0); MapAxis(&T16000, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, JOYY, 0, 0, 0, 3, 0); MapAxis(&T16000, RUDDER, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, RUDDER, 0, 0, 0, 2, 0); MapAxis(&T16000, THR, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, THR, 0, 0, 0, 0, 0); } int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); }
It doesn't work the way you want to because you have it on a pulse. Because of that, when you press a hat direction, it sends only one pulse, even if you keep the button held down. You need to put the button on Hold mode. That way it simulates a key press and sends many pulses when you have the button pressed down. This makes the menu scrolling a lot more comfortable.
I think the button setting is on hold by default, so the correct setup would be:
MapKey(&T16000, H1U,DXHATUP);
MapKey(&T16000, H1R,DXHATRIGHT);
MapKey(&T16000, H1D,DXHATDOWN);
MapKey(&T16000, H1L,DXHATLEFT);
Quote from the TARGET user manual:
The Type field defines the type of behavior for the key combination:
Pulse simulates a brief (temporary) press on the keyboard, even if the button remains activated or in the
“on” position.
Hold simulates pressing and holding the keyboard keys until the button is released.
Press simulates a continuous press on the key combination, even if the joystick button is released.
Release releases a combination of keys that has been “pressed” before.
Pulse simulates a brief (temporary) press on the keyboard, even if the button remains activated or in the
“on” position.
Hold simulates pressing and holding the keyboard keys until the button is released.
Press simulates a continuous press on the key combination, even if the joystick button is released.
Release releases a combination of keys that has been “pressed” before.
Hope you get it working.
E: typos.
Last edited: