Record Midi Notes Only When Renoise Is Focused

I may be the only one bothered by this, but now that I use Rewire a lot, very often I end up writing unwanted notes with my Midi Keyboard (linked to Renoise) while playing with the Rewire Master software (Tracktion), with Renoise hidden but with the Edit On. If Renoise is hidden + Edit On, playing with the keyboard doesn’t add new notes to renoise (since another software has focus). But with the midi keyboard, notes are added to Renoise. Logical, but maybe unwanted.

Could we have an option somewhere for “Only record Midi events if Renoise is focused” ? But if I’m the only one wanting that, don’t bother :).

I requested this too and got shot down.

I suppose a script could be written where if renoise doesn’t have focus edit is turned off and vice versa.
The API probably has a function to check if rewire is on too so you could get it to apply only when rewire is in use.

I’m not saying scripts should be relied on to fix things in renoise though.