When focusing a window on a second display, is there are way to move the mouse as well?

I have two displays; I work on one and would like to play a game requiring some minimal interaction on the second (Loop Hero). The macOS cmd+tab can focus the window on the second display, but the cursor remains on the first display. I want to alter the cmd+tab behavior to move the cursor whenever focusing on an application on another display. Is this possible?

For reference, I've tried Contexts hoping that alt+tab'ing between windows instead of applications would exhibit this behavior, but it doesn't. Also, I'm on Monterey if that matters.


Source of info.

You'll need to download and install:

  1. Catch Mouse
  2. Karabiner Elements (brew cask install karabiner-elements)

Configure:

  1. Move Catch Mouse.app to Applications folder and then open it.
  2. Setup your personal keyboard shortcuts for each display. This will allow your mouse to switch displays.
  3. Use Karabiner Elements to setup a keyboard shortcut that 'clicks' your mouse (to activate the display the mouse just moved to).

Then use your keyboard combination to swith displays and click the mouse.


Shortly after posting my question I came across AutoRaise. It supports warping the mouse to the center of a window selected with the application switcher and giving the window focus after a user-definable delay. The setting "AutoRaise -delay 0" will disable the focus-follows-mouse behavior and only auto-raise a window if it was switched to through the app-switcher.

(I actually forgot that I had stumbled across AutoRaise last year on an old MacBook. I got the pings of memory after posting the question and then dusted the old MB off and found it. I'm not sure why it never came up after exhausting what I thought was every way of searching for this behavior.)