Tips for Unfocus() on root objects

Hey everyone! I'm noticing this issue when using the "unfocus()" on root objects like panels, etc. basically the "unfocus()" command doesn't work. So if I accidentally miss a button, or press a button, but my finger also graces the panel behind the button the Open Stage Control file is still in focus, and my following keyboard inputs go to the wrong window.

Anyone have any advice about adding "unfocus()" to the entire application (upon say touch, not keyboard/mouse input)? I've got it working with buttons, but again with panels it's more tricky.. I can see the issue however when pressing ctrl+e to go into edit mode, if we're not able to focus on the panel sometimes. Could there be a way to unfocus() after touch input only? Thanks!

1 Like

In next version you'll be able to prevent focus on all elements except text inputs and dropdowns by adding nofocus=1 to the server's client-options field. It will only work with the built-in client.

Amazing! Thank you! It's been said many times before, but this software is incredible. Thank you so much for developing it!

Thank you !

Hi alI. I entered ‚noFocus=1‘ in the client options of the server Gui. But contrary to the unfocus() function it does not seem to work. I‘m using the inbuild client under Windows 10. I wonder if I have chosen the correct syntax for the client options field. Any help would be appreciated. Thanks.

I made a little mistake in the update, you'll have to write nofocus instead of noFocus.

Thanks Jean!

Works great! Exactly as I needed it to! Thanks again Jean :smiley:

One issue to look into: when interacting with faders/XY pads it seems to "unfocus" with every value sent, which causes strange things to happen as Windows continues to send focus further and further back on different windows that are open. (I'm using faders to and XY pads to send Midi CC messages)

1 Like

Very strange indeed: the "unfocus" event is sent only when the gesture starts, not when the pointer moves. It's fairly possible I'm missing something that would explain this...

weirdly found that nofocus=1 is the perfect solution for the fader issue, but it also makes it impossible to use edit mode. even when I manually open edit mode and select into a text field in the inspector, it will refocus my DAW and prevent me from typing in OSC. fix for now is to not have nofocus=1 in my startup if I'm editing.

I'll disable this when the editor is on.

1 Like

perfect, thank you!