MapKeyIO should only have 2 outputs
Here's a sample
include "target.tmh"
//program startup
int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
MapAxis(&Joystick, JOYX, DX_X_AXIS);
MapAxis(&Joystick, JOYY, DX_Y_AXIS);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS);
MapAxis(&Throttle, SCX, DX_XROT_AXIS);
MapAxis(&Throttle, SCY, DX_YROT_AXIS);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS);
//buttons
SetShiftButton(&Joystick, S4, &Throttle, PSF, PSB, IOTOGGLE);//use button S4 to toggle io,pinky switch to toggle UMD layers
MapKeyIO(&Throttle, EACON, CHAIN(PULSE+L_ALT+'a',LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)), CHAIN(PULSE+L_SHIFT+'b',LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)));
MapKeyIO(&Throttle, EACOFF, CHAIN(PULSE+L_ALT+'d',LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)), CHAIN(PULSE+L_CTL+'e',LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)));
MapKeyUMD(&Throttle,LTB,'x','y','z');
}
//event handler
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
//add event handling code here
}