Hello Pat,
[Topic moved here.]
Hauptwerk itself doesn't have a generic 'master sostenuto' function generically (although we do have that logged as an enhancement request), but some theatre organ sample sets do include sostenuto functions (including the MasterWorks 3/31 and Paramount series, for example).
Provided that the sample set has such a function, you should just need to use right-click auto-detection to map your MIDI switch/pedal to it.
Most (or probably all) of the theatre organ sample sets support second-touch on their Accompaniment divisions. For such divisions, Hauptwerk allows the second-touch to be triggered by any of the following means (in descending order of preference):
1. MIDI keys with real second-touch contacts (which transmit on a different MIDI channel, or MIDI port, from the main contacts).
2. MIDI key after-touch exceeding a specified threshold.
3. MIDI key velocity exceeding a specified threshold.
4. MIDI channel after-touch exceeding a specified threshold.