Move focus and mouse to another screen

I’ve been using two screens and using hammerspoon to switch keyboard focus and mouse location between the two. Now I am trying to replicate this in BTT but did not find the corresponding action to achieve so. Wondering if I missed anything, or it should be a feature suggestion?

btw hammerspoon plugin lua code for reference

local function activate_other_screen()
	local screen = hs.mouse.getCurrentScreen()
	local nextScreen = screen:next()
	local center = hs.geometry.rectMidPoint(nextScreen:fullFrame())
	local win = hs.fnutils.find(hs.window.orderedWindows(), function(w) return nextScreen:id() == w:screen():id() end)
	if (win) then
		win:focus()
	else
		print('no win')
	end
	hs.mouse.absolutePosition(center)
end 

hs.hotkey.bind({"option"}, "tab", activate_other_screen)

Here's a quick solution with a lot of edge cases and considerations:

instead of left click better use "Activate Window Under Cursor".

I can post some JS that basically does the same as the above lua this evening (currently without my Mac)

Thanks. I think the main blocker for me is to move mouse to the other screen, which of coz will be sometime left, sometimes right to the main one. and none of these options is a good fit.

thanks, and yes some example to find dynamically the next screen will be very helpful!

Hello! I too, would really love an option to automatically activate the screen your cursor is on using multiple-monitor setups. The problem this would solve is when your within a single application that has windows spread across multiple monitors and it requires an extra click to first activate the screen/window if you've moved a cursor to another monitor. This may have been addressed in some other way, but I could not find it searching the forums. This thread was the closest I found to requesting this feature. I suppose if we need a trigger it could be the cursor crossing to a new monitor. Thanks for your consideration, Andreas!