Press/Release Button

Hi, folks! Would you know how to make a press/release button?
I’m working on a virtual instrument where the note button should release when I release the mouse button, but I need to “unselect” the note manually.

ChatGPT says the “momentary=true” in UI should resolve, but its not working.

Hi and welcome to the forum,

Are you talking about a VST3 instrument?

Dis you want to send this to the Developer: VST3 SDK category?

Sorry, wrong window.
Thanks, Martin