MidiKeyboardComponent as toggles

Hi,

Is there a way to let the MidiKeyboardComponent act as toggle buttons?
What I need is a 1 octave keyboard component where you can toggle notes on and off which updates an array of 12 bools, don’t care much about sending midi notes for now.
I tried deriving a class “MyMidiKeyboardComponent” and overriding the mouseUp method to see of it sticks but it didn’t.
I’m very new to Juce and c++ as well so please forgive the obvious ignorance.

Best,
Sam