The documentation says: “this method will be called on the component that currently has the keyboard focus”.
The JUCE source code says:
auto* target = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse();
…and then proceeds to do things with that pointer.
What’s the intended functionality of that method?
If I have several components which want keyboard focus (mouse clicked on them and then they react to keyboard presses), shouldn’t the above method select the component that has focus currently instead of the one under the HOVERING mouse cursor?
I have a bug now:
- I use grabKeyboardFocus() to select the component which should receive the keyboard presses.
- The messages for Shift key still go to the component under the mouse cursor, which is not what I want.
Is this a JUCE bug or documentation error or my own misunderstanding how this thing should work?