Add Key Commands to control Window focus (Metagrid users you want this)

I was going to ask the OP for a known example that we can look at, but you beat me to it. :confused:

For some commands it is reasonable that the current focus gets taken into account. For example if I have both the Project Window and the Key Editor open. Then I type “4” which selects the Glue Tool - does the tool change in the Project Window, the Key Editor or both?

The way it works now is if the Key Ed has focus then its tool changes. But if the Key Ed does not have focus then the tool will change in the Project Window. This occurs not only if the Project window has focus but also if another window such as the Mixconsole or a VSTi has focus. So when there is ambiguity in how the command should work Cubase uses focus to resolve that ambiguity. That all kind of makes sense, except in most cases we can only set focus using the mouse (ugh).

If Cubase had a set of window focus commands I could write a couple of (faux) macros like:

KeyEdGlue
set focus keyeditor
tools/glue

ProjectWinGlue
set focus ProjectWin
tools/glue

Now those two macros actions are not ambiguous and I can select the glue tool for a specific window without any risk of needing to use the mouse :astonished:

In Metagrid I could then create a button to do the same thing for the Key Ed in two ways.

  1. Have its Action Queue run my macros.
    or
  2. Have its Action Queue run these commands
    set focus keyeditor
    tools/glue

So anytime a command could be applied in multiple windows Cubase uses focus to resolve the ambiguity between which window to apply the command to. Having focus commands would let us automate focus selection.

To the OP can you provide an example where you need to set the focus with a mouse even though there is only one window where the command(s) could be applied?