Setting keyboard focus

I have a list of components, each of which holds a number of sub components like sliders, buttons. Ideally I’d like to enable keyboard access to traversing the list of components so that key up/down changes the selected component (upon which other keys change the sub components). Makes sense ? :slight_smile:

Anyway, I cannot get it to work, i.e. the keyboard focus does not seem to be grabbed until I click on one of the sub components, after which the navigation stuff starts to work (this is currently on windows, don’t know how it works on OSX yet).

Ideas what to try ? (setWantsKeyboardFocus and grabKeyboardFocus I’ve tried already…)

I found it out :slight_smile: If I post a message, and do the grabbing in the message handler it works a lot better…