Resize pip window


I often use the picture in picture function of safari and wonder if I can realize the following with KM.

While working on my computer I like to have the pip window at its smallest size. When I move the mouse over the pip window it should temporarily resize to its maximum size. When it lose focus I would like to minimize it again automatically.

Unfortunately I don't know how to address the pip window.
Does anyone have an idea how I can realize this ?


I can tell you how I do it. I enter the pip mode with a shortcut. From there I maximize the window with "f".

If it's not possible with the mouse, I'd like to consider your shortcut solution.
Would you like to share?

To enter Safari's PiP mode start playing a video and then right-click or Control-click on the video twice. Then a menu appears where you can select pip. I don't do this with KM, but it can certainly be done with a KM macro. KM has gestures as triggers. So you should be able to trigger the macro with the mouse, if that's what you mean. To maximize the window again just press "f". Theoretically you can also trigger this with the mouse. The size of the pip window remains as you set it, even if you switch between pip and Full screen, so no need to resize.