// My DX Button profile for IL2. All DC buttons with S4 Shift modifier using Right Control include "target.tmh" //program startup int main() { // Device exclusions // Configure(&Throttle, MODE_EXCLUDED); // Configure(&Joystick, MODE_EXCLUDED); Configure(&JoystickF18, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); Configure(&HCougar, MODE_EXCLUDED); Configure(&T16000, MODE_EXCLUDED); Configure(&T16000L, MODE_EXCLUDED); Configure(&TWCSThrottle, MODE_EXCLUDED); Configure(&TFRPRudder, MODE_EXCLUDED); Configure(&A320Pilot, MODE_EXCLUDED); Configure(&A320Copilot, MODE_EXCLUDED); Configure(&TCAQuadrant12, MODE_EXCLUDED); Configure(&TCAQuadrant34, MODE_EXCLUDED); Configure(&TFRPHARudder, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; // declare the event handler, return on error // General Settings SetKBLayout(KB_ENG); // Non DX Buttons MapKey(&Joystick,S4,R_CTL); // Map Joystick Buttons MapKey(&Joystick,TG1,DX1); MapKey(&Joystick,TG2,DX2); MapKey(&Joystick,S1,DX3); MapKey(&Joystick,S2,DX4); MapKey(&Joystick,S3,DX5); // MapKey(&Joystick,S4,DX6); MapKey(&Joystick,H1U,DX7); MapKey(&Joystick,H1D,DX8); MapKey(&Joystick,H1L,DX9); MapKey(&Joystick,H1R,DX10); MapKey(&Joystick,H2U,DX11); MapKey(&Joystick,H2D,DX12); MapKey(&Joystick,H2L,DX13); MapKey(&Joystick,H2R,DX14); MapKey(&Joystick,H3U,DX15); MapKey(&Joystick,H3D,DX16); MapKey(&Joystick,H3L,DX17); MapKey(&Joystick,H3R,DX18); MapKey(&Joystick,H4U,DX19); MapKey(&Joystick,H4D,DX20); MapKey(&Joystick,H4L,DX21); MapKey(&Joystick,H4R,DX22); MapKey(&Joystick,H4P,DX23); // Map joystick axis MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Map Throttle buttons MapKey(&Throttle,SC,DX24); MapKey(&Throttle,MSU,DX25); MapKey(&Throttle,MSD,DX26); MapKey(&Throttle,MSL,DX27); MapKey(&Throttle,MSR,DX28); MapKey(&Throttle,MSP,DX29); MapKey(&Throttle,SPDF,DX30); MapKey(&Throttle,SPDM,PULSE+DX31); MapKey(&Throttle,SPDB,DX32); MapKey(&Throttle,BSF,PULSE+DX33); MapKey(&Throttle,BSM,PULSE+DX34); MapKey(&Throttle,BSB,PULSE+DX35); MapKey(&Throttle,CHF,DX36); MapKey(&Throttle,CHM,PULSE+DX37); MapKey(&Throttle,CHB,DX38); MapKey(&Throttle,PSF,PULSE+DX39); MapKey(&Throttle,PSM,PULSE+DX40); MapKey(&Throttle,PSB,PULSE+DX41); MapKey(&Throttle,CSU,DX42); MapKey(&Throttle,CSD,DX43); MapKey(&Throttle,CSL,DX44); MapKey(&Throttle,CSR,DX45); MapKey(&Throttle,LTB,DX46); MapKey(&Throttle,EFLNORM,PULSE+DX47); MapKey(&Throttle,EFLOVER,PULSE+DX48); MapKey(&Throttle,EFRNORM,PULSE+DX49); MapKey(&Throttle,EFROVER,PULSE+DX50); MapKey(&Throttle,EOLIGN,DX51); MapKey(&Throttle,EOLNORM,PULSE+DX52); MapKey(&Throttle,EOLMOTOR,PULSE+DX53); MapKey(&Throttle,EORIGN,DX54); MapKey(&Throttle,EORNORM,PULSE+DX55); MapKey(&Throttle,EORMOTOR,PULSE+DX56); MapKey(&Throttle,APUON,PULSE+DX57); MapKey(&Throttle,APUOFF,PULSE+DX58); MapKey(&Throttle,LDGH,PULSE+DX59); MapKey(&Throttle,FLAPU,DX60); MapKey(&Throttle,FLAPM,PULSE+DX61); MapKey(&Throttle,FLAPD,DX62); MapKey(&Throttle,EACON,PULSE+DX63); MapKey(&Throttle,EACOFF,PULSE+DX64); MapKey(&Throttle,RDRNRM,PULSE+DX65); MapKey(&Throttle,RDRDIS,PULSE+DX66); MapKey(&Throttle,APPAT,PULSE+DX67); MapKey(&Throttle,APAH,PULSE+DX68); MapKey(&Throttle,APALT,PULSE+DX69); MapKey(&Throttle,APENG,PULSE+DX70); MapKey(&Throttle,IDLELON,PULSE+DX71); MapKey(&Throttle,IDLERON,PULSE+DX72); // Map Throttle Axis MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0); MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0); //add initialization code here ActKey(PULSE+KEYON+LED(&Throttle,LED_INTENSITY,50)); } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here }