Multiply that by around 100 switches, lights and knobs... and it's a really, really bad idea when it comes to multiplayer/shared cockpit.
Ed,
10,100...1000...up to trigger_key_event(iEvent,iValue) is the same code, no extra lines needed. The only part that could become "heavy" is this one:
Code:
const int AC_SWITCH = 70000;
void FSAPI EventHandler(ID32 event, UINT32 evdata, PVOID userdata)
{
switch(event)
{
case AC_SWITCH:
etc
but that would be the same when using this method and by <EventID> as well.
In any case, the bad idea would be so many switches,lights and knobs and not the code to handle them
Tom