Focus another window, send the same keystroke then focus back on the previous window

Hello, I am looking to build a preset that does the following :

When the keyboard key ‘9’ is pressed

  • If the window ‘Cubase Pro Project’ is in focus
  1. Put the window ‘Key Editor’ in focus
  2. Send the key ‘9’ again
  3. Put the window ‘Cubase Pro Project’ in focus again
  • If the window "* If the window ‘Key Editor’ is in focus
  1. Put the window ‘Cubase pro project’ in focus
  2. Send the key ‘9’ again
  3. Put the window ‘Key Editor’ in focus again" is in focus

The key ‘9’ perform a zoom to locators function, but since the zoom function in cubase is not in sync between the two windows, and I like working in split screen like that, I am looking for a way to sync the zoom.

I think it might be too complex to perform for BMT, the only application is the list of the outgoing action is ‘Cubase 13.exe’

Thanks

Hi, please find the following. It should be pretty close but on 100%. You might need to play with the timing of the keystrokes a bit. Also I had to use as incoming keystroke instead of 9 because otherwise sending the keystroke would create an infinite loop of sending and triggering the incoming 9.

I use global variables ga and gb to determine which application is currently focused. I use the global variable gc to determine where to focus back once the keystroke is sent. I use a 200ms watchdog timer that triggers the return.

The rules, do a combination of determining what is focused to determine whether focus needs to be send an I use ‘Perform’ heavily within rules in the order I want things done.

I hope this at least gets you started.

Keystroke-Redirection-2024-05-03.bmtp (3.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thanks !

Should I replace ‘notepad.exe’ with ‘Key Editor’ ? Because the second window is name ‘Key Editor’ but it doesn’t have a dedicated .exe

Ah, the application indeed will need to have an executable file (.exe). Is it a Windows Store application?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

nop, it’s a sub window within the cubase app!

Too bad, maybe there is something in Cubase that you can use to navigate between Cubase Window. Some Daws have keystrokes for that.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Well I was hoping the Cubase 13 could handle Windows injected events so I gave it a try but it doesn’t look that Cubase supports it. Well it was worth a shot.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz