Force keyboard focus at start

I’m getting inconsistent results trying to ensure that an installation with public keyboard but no mouse has keyboard focus on start. Any suggestions?

I’ve tried this which works sometimes but not with 100% reliability.

op(“/view/field1”).setFocus(moveMouse=True)
op(“/view/field1”).setKeyboardFocus(selectAll=False)

I’m now wondering if the best approach might be to call an external python based desktop automation tool to force focus with a click.

Has anyone tried that?

Is it a newly opened window? If so, trying running the setFocus commands delayed by a few frames. I’m guessing that it isn’t 100% reliable because of how long it takes for the window to load, since there’s a time out delay for that command.

I’ll look into a better long term solution since this crops up now and then.

No, this is just another Window on a another display.

The rig has three displays, console display 0 with a show control UI, public display 1 and public display 2. Public screen 1 responds to keyboard interactions but it’s easy for focus to be lost from this window - especially when doing remote connections.

I’m now looking at Autohotkey to do the focus clicks outside of Touch