A question about the Audio demo in Juce Demo

I 've copie the Audio demo’s source code for making a new program. Of course I made a few adjustment, but I didn’t add anything.

I didnt find anything in the code related to keypress in the midikeyboardcomponent, but after a mouse click at an arbitrary key on the keyboardcomponent, I can use the computer’s keyboard to trigger midimessage from c4 to some key above…

How could it happen?

I think you just needed to search a little harder - it uses a normal keyStateChanged() callback to grab the keys.