Virtual MIDI Keyboard Plugin Doesn't Record Notes in DAW (Logic)

Hi all,

I created a sampler plugin. When I click on the virtual keyboard that I made in the plugin, a sound is played, and the volume bar in the instrument track on Logic goes up, which means that it must be recognizing sound. However, if I try to record the instrument, Logic doesn’t seem to pick up anything on the plugin keyboard. On the other hand, if I use musical typing, it works just fine and my pressed notes are recorded just fine. Anyone know how I can fix this so that playing my plugin’s virtual keyboard will record in Logic?

Thanks