Anyone using a Thrustmaster Warthog w/ MFS?

how are verifying it is permanently switched to on?

Because it won’t move to off?

Tthanks for great tutorial.

I hope that this helps?

No Type Category A Category B Function Key Binding A Key Binding B Comments
1 Joystick Mapping AutoPilot Autopilot NAV1 Hold 12
2 Joystick Mapping AutoPilot Toggle Autopilot Altitude Hold 5
3 Joystick Mapping AutoPilot Toggle Autopilot Approach Hold 13
4 Joystick Mapping AutoPilot Toggle Autopilot Flight Level Change 11
5 Joystick Mapping AutoPilot Toggle Autopilot Heading Hold 14
6 Joystick Mapping AutoPilot Toggle Autopilot Master 2
7 Joystick Mapping Brakes Toggle Anti Skid Brakes 4
8 Joystick Mapping Camera Camera Mode Switch Cockpit External View Mode 19
9 Joystick Mapping Camera Cockpit Camera Cockpit Quickview Left 18
10 Joystick Mapping Camera Cockpit Camera Cockpit Quickview Rear 17
11 Joystick Mapping Camera Cockpit Camera Cockpit Quickview Right 16
12 Joystick Mapping Camera Cockpit Camera Cockpit View Upper 15
13 Joystick Mapping Camera Cockpit Camera Next Pilot Position 7
14 Joystick Mapping Camera Cockpit Camera Previous Pilot Position 9
15 Joystick Mapping Camera Cockpit Camera Reset Cockpit View 3
16 Joystick Mapping Camera Cockpit Camera Unzoom Cockpit View 10
17 Joystick Mapping Camera Drone Camera Decrease Drone Zoom 10
18 Joystick Mapping Camera Drone Camera Increase Drone Zoom 8
19 Joystick Mapping Camera External Camera External Quickview Left 16
20 Joystick Mapping Camera External Camera External Quickview Rear 17
21 Joystick Mapping Camera External Camera External Quickview Right 18
22 Joystick Mapping Camera External Camera External Quickview Top 15
23 Joystick Mapping Camera External Camera Reset External View 3
24 Joystick Mapping Camera External Camera Unzoom External View 10
25 Joystick Mapping Camera External Camera Zoom External View 8
26 Joystick Mapping Camera Fixed Camera Reset Fixed Camera 3
27 Joystick Mapping Camera Instrument Views Instrument View Down 17
28 Joystick Mapping Camera Instrument Views Instrument View Up 15
29 Joystick Mapping Camera Instrument Views Next Instrument View 16
30 Joystick Mapping Camera Instrument Views Previous Instrument View 18
31 Joystick Mapping Camera Instrument Views VR - Camera Reset 3
32 Joystick Mapping Camera Instrument Views VR - Cockpit Focus 1
33 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces Aileron Trim Left POV ?
34 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces Aileron Trim Right POV ?
35 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces Elevator Trim Down (Nose Down) POV ?
36 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces Elevator Trim Up (Nose Up) POV ?
37 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces VR - Activate / Deactivate VR Mode 1 + 6
38 Joystick Mapping Flight Control Surfaces Control Trimming Surfaces VR - Toolbar Toggle 7
39 Joystick Mapping Flight Control Surfaces Primary Control Surfaces Ailerons Axis Joystick L-Axis X
40 Joystick Mapping Flight Control Surfaces Primary Control Surfaces Ailerons Axis - Reverse Axis
41 Joystick Mapping Flight Control Surfaces Primary Control Surfaces Elevator Axis Joystick L-Axis Y
42 Joystick Mapping Flight Control Surfaces Primary Control Surfaces Elevator Axis - Reverse Axis
43 Joystick Mapping Flight Control Surfaces Primary Control Surfaces Reverse Axis
44 Throttle Mapping Autopilot Autothrottle Disconnect 15
45 Throttle Mapping Autopilot Decrease Autopilot Reference Airspeed 6
46 Throttle Mapping Autopilot Decrease Autopilot Reference Altitude 5
47 Throttle Mapping Autopilot Increase Autopilot Reference Airspeed 4
48 Throttle Mapping Autopilot Increase Autopilot Reference Altitude 3
49 Throttle Mapping Autopilot Increase Autopilot Reference VS POV ?
50 Throttle Mapping Autopilot Set Autopilot Airspeed Hold 27
51 Throttle Mapping Autopilot Set Autopilot NAV Select 25
52 Throttle Mapping Autopilot Set Yaw Damper 17
53 Throttle Mapping Autopilot Toggle Autopilot VS Hold 2
54 Throttle Mapping Brakes Set Parking Brake 20
55 Throttle Mapping Camera Cockpit Camera Cockpit View Pitch Axis Joystick L-Axis Y
56 Throttle Mapping Camera Cockpit Camera Cockpit View Pitch Axis - Reverse Axis Joystick L-Axis Y
57 Throttle Mapping Camera Cockpit Camera Cockpit View Yaw Axis Joystick L-Axis X
58 Throttle Mapping Camera Cockpit Camera Cockpit View Yaw Axis - Reverse Axis Joystick L-Axis X
59 Throttle Mapping Camera Drone Camera Drone Pitch Axis Joystick L-Axis Y
60 Throttle Mapping Camera Drone Camera Drone Pitch Axis Joystick L-Axis Y
61 Throttle Mapping Camera Drone Camera Drone Yaw Axis Joystick L-Axis X
62 Throttle Mapping Camera Drone Camera Drone Yaw Axis - Reverse Axis Joystick L-Axis Y
63 Throttle Mapping Camera External Camera External View Pitch Axis Joystick L-Axis Y
64 Throttle Mapping Camera External Camera External View Pitch Axis - Reverse Axis Joystick L-Axis Y
65 Throttle Mapping Camera External Camera External View Yaw Axis Joystick L-Axis X
66 Throttle Mapping Camera External Camera External View Yaw Axis - Reverse Axis Joystick L-Axis X
67 Throttle Mapping Camera VR - Cockpit VR - Cockpit Focus Unidentified
68 Throttle Mapping Flight Control Surfaces Landing Gear Toggle Landing Gear 21
69 Throttle Mapping Flight Control Surfaces Secondary Control Surfaces Arm Auto Spoilers 7
70 Throttle Mapping Flight Control Surfaces Secondary Control Surfaces Decrease Flaps 22
71 Throttle Mapping Flight Control Surfaces Secondary Control Surfaces Extend Spoilers 8
72 Throttle Mapping Flight Control Surfaces Secondary Control Surfaces Increase Flaps 23
73 Throttle Mapping Flight Control Surfaces Secondary Control Surfaces Retract Spoilers 7
74 Throttle Mapping Instruments and Systems Engine Instruments Toggle Starter 1 31
75 Throttle Mapping Instruments and Systems Engine Instruments Toggle Starter 2 32
76 Throttle Mapping Instruments and Systems Engine Instruments Toggle Starter 3 31
77 Throttle Mapping Instruments and Systems Engine Instruments Toggle Starter 4 32
78 Throttle Mapping Instruments and Systems Flight Instruments Decrease Heading Bug POV ?
79 Throttle Mapping Instruments and Systems Flight Instruments Increase Heading Bug POV ?
80 Throttle Mapping Instruments and Systems Flight Instruments Kollsman - Decrease Altimeter 10 Boat Switch
81 Throttle Mapping Instruments and Systems Flight Instruments Kollsman - Increase Altimeter 9 Boat Switch
82 Throttle Mapping Instruments and Systems Flight Instruments Toggle GPS Drives NAV1 26
83 Throttle Mapping Lights Exterior Lights Set Landing Lights 14
84 Throttle Mapping Lights Exterior Lights Set Strobes 13
85 Throttle Mapping Power Management Propellor Propeller Axis Joystick Slider X
86 Throttle Mapping Power Management Propellor Propeller Axis - Reverse Axix Joystick Slider X
87 Throttle Mapping Power Management Throttle Hold Throttle Reverse Thrust 11
88 Throttle Mapping Power Management Throttle Hold Throttle Reverse Thrust 11
89 Throttle Mapping Power Management Throttle Throttle 1 Axis Joystick R-Axis Z
90 Throttle Mapping Power Management Throttle Throttle 1 Axis - Reverse Axis Joystick R-Axis Z
91 Throttle Mapping Power Management Throttle Throttle 1 Cut 30 18
92 Throttle Mapping Power Management Throttle Throttle 2 Axis Joystick L-Axis Z
93 Throttle Mapping Power Management Throttle Throttle 2 Axis - Reverse Axis Joystick R-Axis Z
94 Throttle Mapping Power Management Throttle Throttle 2 Cut 29 19
95 Throttle Mapping Power Management Throttle Throttle 3 Axis Joystick R-Axis Z
96 Throttle Mapping Power Management Throttle Throttle 3 Axis - Reverse Axis Joystick R-Axis Z
97 Throttle Mapping Power Management Throttle Throttle 3 Cut 30 18
98 Throttle Mapping Power Management Throttle Throttle 4 Axis Joystick L-Axis Z
99 Throttle Mapping Power Management Throttle Throttle 4 Axis - Reverse Axis Joystick L-Axis Z
100 Throttle Mapping Power Management Throttle Throttle 4 Cut 29 19
101 Throttle Mapping Power Management Throttle Toggle Throttle Reverse Thrust 12

Here is a potential script that implements the mappings defined in the table:

include “target.tmh”

int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error

Copy code
// Joystick mappings
MapKey(&Joystick, TG1, PULSE+USB[0x2C]); // Wheel Brake
MapKey(&Joystick, H2U, 0);
MapKey(&Joystick, H2D, 0);
MapKey(&Joystick, H2L, PULSE+USB[0x50]); // Look Left
MapKey(&Joystick, H2R, PULSE+USB[0x4F]); // Look Right
MapKey(&Joystick, H3U, PULSE+USB[0x52]); // Look Up
MapKey(&Joystick, H3D, PULSE+USB[0x51]); // Look Down
MapKey(&Joystick, H4U, PULSE+‘x’); //Zoom In
MapKey(&Joystick, H4D, PULSE+‘z’); //Zoom Out
MapKey(&Joystick, S2, 0);
MapKey(&Joystick, S3, PULSE+USB[0x3A]); //Reset Cockpit View
MapKey(&Joystick, S4, CHAIN(
EXEC(“ActKey(PULSE+KEYON+USB[0x07]);”), // Flaps Up
D(200),
EXEC(“ActKey(PULSE+KEYON+USB[0x07]);”) // Flaps Down
));

// Throttle mappings
MapKey(&Throttle, APENG, PULSE+‘a’); // Toggle Autopilot Master
MapKey(&Throttle, APPAT, EXEC(“MapKey(&Throttle, APENG, PULSE+L_ALT+USB[0x23]);”)); // Route Following
MapKey(&Throttle, APAH, EXEC(“MapKey(&Throttle, APENG, PULSE+L_ALT+USB[0x1E]);”)); // Heading Hold
MapKey(&Throttle, APALT, EXEC(“MapKey(&Throttle, APENG, PULSE+L_ALT+USB[0x21]);”)); // Altitude Hold
MapKey(&Throttle, PBON, PULSE+USB[0x14]); // Parking Brake On
MapKey(&Throttle, EACON, CHAIN(
EXEC(“ActKey(KEYON+PULSE+USB[0x09]);”), // Landing Lights On
EXEC(“ActKey(KEYON+PULSE+USB[0x0B]);”) // Taxi Lights On
));
MapKey(&Throttle, EACOFF, CHAIN(
EXEC(“ActKey(KEYON+PULSE+USB[0x38]);”), // Landing Lights Off
EXEC(“ActKey(KEYON+PULSE+USB[0x38]);”) // Taxi Lights Off
));
MapKey(&Throttle, RDRNRM, PULSE+USB[0x1A]); // Turn On Strobes
MapKey(&Throttle, RDRDIS, PULSE+USB[0x38]); // Turn Off Strobes
MapKey(&Throttle, APUON, EXEC(“ActKey(PULSE+KEYON+USB[0x1E]);”)); // Engine 1 Start
MapKey(&Throttle, APUOFF, EXEC(“ActKey(PULSE+KEYON+USB[0x1F]);”)); // Engine 2 Start
MapKeyR(&Throttle, APUOFF, EXEC(“ActKey(PULSE+KEYON+USB[0x1E]);”)); // Engine 1 Stop
MapKeyR(&Throttle, APUOFF, EXEC(“ActKey(PULSE+KEYON+USB[0x1F]);”)); // Engine 2 Stop
MapKey(&Throttle, LDGH, PULSE+‘g’); //Landing Gear Up/Down
MapKey(&Throttle, CRUISE, EXEC(“ActKey(KEYON+PULSE+L_ALT+USB[0x02]);”)); // Set Airspeed Hold
MapKey(&Throttle, CSU, L_SHIFT+USB[0x23]); // Trim Up
MapKey(&Throttle, CSD, L_SHIFT+USB[0x1B]); // Trim Down

//Axis Mappings
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, AXIS_NORMAL, MAP_RELATIVE);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_RELATIVE);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS);

//Throttle Slew Control Axes
SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4); // Make slew control less sensitive
SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);
}

int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}

This script maps the buttons, switches and axes of the HOTAS Warthog throttle and joystick according to the keybindings defined in the CSV file. It uses the USB code format for the keybindings.

Some key points:
It maps the joystick and throttle axes to the standard DirectX axes
For the slew control axes, it uses MAP_RELATIVE mode and adjusts the curves to make them less sensitive
It uses EXEC commands to dynamically remap certain autopilot buttons depending on the position of the LASTE switch
It uses PULSE for most key presses to prevent keys getting stuck on
It uses CHAIN to send multiple keystrokes for things like turning on/off lights
It uses MapKeyR to map key releases for the APU switches to stop the engines
Let me know if you have any other questions! I tried to follow the bindings from the CSV as closely as possible while organizing the script in a logical way with comments.