The documentation for the pszInputDefinition parameter states the following:
For joysticks the input definition is in the form "joystick:n:input[:i]", where n is the joystick number (starting from 0) ...
In the past, I've always interpreted the "Joystick Number" by looking at the controller order in the USB Game Controllers dialog, and that has always worked perfectly, for FSX and P3D v1 & v2. But in P3D v3 something has changed. Depending on what order I plug the controllers in, and what USB port I plug them into, problems come up. The order of controllers in the USB Controller dialog may or may not match the order of controllers in P3D Settings / Controls dialog, which may or may not match the internal number used by SimConnect_MapInputEventToClientEvent.
This is obviously a problem, because, a) it means you have to search for the right controller number using trial and error, b) it can change if you plug the controllers in differently, and c) it's no longer consistent between different flight sim versions.
This affects my commercial addon FS Force.
I wonder if this is connected with the other reported issue in this sub-forum?