Set Focus to Disk Browser, or to Pattern Editor Globally?

Hi, is there some method of setting cursor focus / selection focus to Disk Browser, or to the Pattern Editor? I’m basically trying to set midi buttons so that if I press one button, I will be brought directly to keyboard focus in Disk Browser, I press another button, I’m immediately keyboard focus in Pattern Editor.

Crucial detail: Will these focuses work with non-bridged plugins that steal keyboard access? Can I somehow escape keyboard-stuck-in-plugin?

I’ve tried to do this:

renoise.tool():add_keybinding {name="Global:Track Devices:Load OhmForce OhmBoyz", invoke = function() loadvst("Audio/Effects/AU/aumf:OByZ:OmFo")


but does not seem to help. Maybe I should lock the keyboard focus twice, once before loadvst, and once after loadvst?

So far the only solution for switching Keyboard Focus to Disk Browser I’ve come across is saving a Screenset with Disk Browser focused.

But then I don’t know how to query which Screenset we’re in, so I could press the shortcut again to go from DiskBrowser_focus to PatternEditor_focus.

so the only thing i can come up with is this

renoise.tool():add_keybinding{name="Global:Paketti:Disk Browser Focus",invoke=function() end}

and set the 8th preset to always have disk browser focus.

what i don’t know is how to return from that, to pattern editor, and back. so “if disk browser focus = yes then pattern editor focus yes, else disk browser focus = yes”.

it’s like there’s no way of telling where the focus is.

There are a few app properties in the API – here is one example:

//     -- Frame with the pattern editor, mixer...
//, _observable
//       -> [enum = MIDDLE_FRAME]

That enum looks like:

export enum MIDDLE_FRAME {

There are some other properties with other enums. Hope it helps.