Getting / setting keyboard focus?

Is it possible to switch the view to the automation tab, but keep the focus on the track dsp (which is not visible then)?

And is there a shortcut scope for the automation view? Ok, found this.

How do I set the keyboard focus via LUA? Unable to find a fitting method in the API…

EDIT:

I now tried this:

rna.window.lock_keyboard_focus = true
rna.window.active_lower_frame = renoise.ApplicationWindow.LOWER_FRAME_TRACK_AUTOMATION
rna.window.lock_keyboard_focus = false

Still the focus is changed. So it is working only for the middle frame obviously, which is a pity.

Would be nice if you could set the keyboard focus. Also how do I get the current keyboard focus? So I could provide just a shortcut on global scope and then programmaticallydifferentiate the keyboard focus…