Only thing is make this with TARGET (script or GUI)..it could also be done by editing lua files (I don't know about that)...
With TARGET script editor it would like something like this..
Inside of F15.tmc file
.....
MapKey(&Throttle,EACON,ECM_on);
MapKey(&Throttle,EACOFF,PULSE+ECM_off);
....
Inside F15.ttm
....
define ECM_on DX24 (I assume that you use standard DX inputs)
define ECM_off "what ever is input for this"
....