I wouldn't use the keyswitch on the midi keyboard. Because playback is your priority, don't worry about the sound that is heard when entering notes.
The other place to consider is if the text expression to switch is place properly in the score. That should be prior to the switch but not until the previous music has ended.
The other place to consider is if the text expression to switch is place properly in the score. That should be prior to the switch but not until the previous music has ended.