I’m sure this is possible, tried to do it with JS but couldn’t because I don’t see any information in the BTT JS docs about getting values about the currently active window and cursor position.
All I need is an if statement to tell me if the mouse is already inside the newly focused window or not.
When the focused window is changed. It checks if the cursor is already inside the focused window, if not then it moves it to the center of that window. (code attached at the bottom of this post)