The MIDI-1.0 protocol contains the meta event "Key signature" (see page 10 of the MIDI-1.0 spec).
In our software we use the logic
- if the Meta Event "key signature" exits in the MIDI file then the software takes this event to become the key signature
- in case there is no "key signature" MIDI event present, the software does a best guess
The attached MIDI file "come fly pt.mid" contains the MIDI meta event key signature to be F#. This key is used when imported.
I have checked the 6 other major notation programs which we use for interface testing. MuseScore is the only one which goes with B sharp but everyone else chooses F# just like Composer.
Reinhold