Hello Jucers
I'm trying to create a simplified MIDI keyboard with a custom look and feel. Since it doesn't appear that Juce's LookAndFeel allows this, I'm trying to make my own component from scratch.
Basically I have a bunch of keys which are child components of my custom keyboard component. My keyboard component is listening to those child components for mouse events. So the desired behavior is this: when the mouse is being dragged out of one key and onto another, the old key's noteOff should be sent and the new key's noteOn should be sent.
However as other forum posts of yore point out, when dragging from one component to another, the new component ignores the mouse (which is obviously desirable for a lot of situations, but not mine). I can trigger notes perfectly just using mouseEnter and mouseExit so long as I don't actually do any clicking (but that's pretty useless).
I've tried disabling setInterceptsMouseClicks for my keys, however that disables mouseEnter and mouseExit as well. Some old post recommended overlaying another transparent component on top of everything, but that seems a bit convoluted.
Is there a simple, elegant way to do this that I'm missing? I've been staring at this problem for too long, so hoping one of you can trigger a light bulb for me. Thanks!
nick