Macro to activate via keyboard the "Move to iPad" (the option under the green circle on hover) for the active window?

Is there a way to move the current window to ipad via keyboard shortcut?

Currently, I have to hover over the Maximise (green button at the top) to do it.

the action "move window to next monitor" might help ?

doesn't work unfortunatelly - i get this popup once, and then nothing happens.
image

I got that message as well when I use the ipad with Sidebar, but when the iPad is configured as a second display it works fine.

ah but maybe that's the problem - because i don't do anything for this green button to appear (per image below). this button both connects the ipad + moves the icon.

the ipad is locked pre-green button, and post-green button is lit up + with the window in.

that's what i'm trying to replicate.

image

it looks that the green button "Move to iPad" first activates the Sidebar/iPad display and then moves the window.

Somehow, the BTT actions ‘Activate Display Mirror’ or ‘Activate AirPlay Display’ are not working on my Ventura 13.5 running the German version. Could this be a bug?

But there is an Apple Script which does that as well (check here)

tell application "System Events"
	
	tell its application process "ControlCenter"
		
		tell its menu bar 1
			-- click on and open Control Center drop down
			tell (UI elements whose description is "Kontrollzentrum")
				click
			end tell
		end tell
		
		
		-- interact with Control Center window
		tell its window "Kontrollzentrum"
			delay 0.5
			-- click screen mirroring button
			set screenMirroringButton to button 2 of group 1
			-- click screenMirroringButton click doesn't work
			perform action 1 of screenMirroringButton
			delay 0.5
			set myScreen to checkbox 1 of its scroll area 1 of group 1
			perform action 1 of myScreen
		end tell
		
		
	end tell
end tell

Note that "Kontrollzentrum" is the german term for "Control Center", change it to term used by your system. In English it should be "Control Center".

So I have two shortcuts:
(1) to activate/deactivate the iPad sidebar/display
(2) to move the window accross (and back).

i'm grateful!!