Resource icon

Zoom to Mouse 1.0.1

Hi @BlankSourceCode

Thanks for making this fantastic script!

I'm having trouble getting it to correctly follow my mouse position in Mac OS 13.6 (M1 MacBook Pro)
I am working on a secondary LG Ultrafine monitor which is 3840 x 2160 (mac os is scaling the display to 3008 x 1692)
The source window S I'm trying to zoom in on, when I measure it is 1929 x 1110

The zoom does not work as expected, I have to go way off to the right of the large monitor to get it to zoom in anywhere on the right hand side of the source.
The readme on GitHub tries to explain in more detail how the x,y width, height scalex, scaley values work with examples.


My guess is that it is some combination of x,y still being zero in your screenshot. That would mean the window you have set as the source is at the very top left position on the monitor which I suspect isn't the case.

Also Mac's (especially those with retina displays) have a tendency to report incorrect pixel sizes and scaling to OBS and therefore the script. The scale x and scale y values are used to account for this. You can take a look at this issue on GitHub where I try to figure it out with another user:


Essentially the script is trying to convert mouse coordinates (measured in actual OS pixels) into positions in OBS (measured in whatever scaling OBS is using to squish the thing it's recording on to the canvas you made). Since there are so many factors involved in different setups it's difficult to account for.

Good luck!
 

3dfromzero

New Member
The readme on GitHub tries to explain in more detail how the x,y width, height scalex, scaley values work with examples.


My guess is that it is some combination of x,y still being zero in your screenshot. That would mean the window you have set as the source is at the very top left position on the monitor which I suspect isn't the case.

Also Mac's (especially those with retina displays) have a tendency to report incorrect pixel sizes and scaling to OBS and therefore the script. The scale x and scale y values are used to account for this. You can take a look at this issue on GitHub where I try to figure it out with another user:


Essentially the script is trying to convert mouse coordinates (measured in actual OS pixels) into positions in OBS (measured in whatever scaling OBS is using to squish the thing it's recording on to the canvas you made). Since there are so many factors involved in different setups it's difficult to account for.

Good luck!
Fantastic, thanks for your help @BlankSourceCode I will continue to puzzle it over. Cheers!
 

FTech3

New Member
Here's an edited version of your text:

@BlankSourceCode Thank you for this helpful plugin. I'm using a Mac with a secondary display monitor for creating programming tutorial videos. OBS is on my laptop, and I type on my second monitor. I've set up hotkeys 1 and 2 for zooming, but there's an issue:

Every time I want to use the zoom function, I have to:
1. Move my mouse pointer to the laptop screen
2. Click on the OBS preview
3. Use the zoom hotkeys

After typing on the second monitor, the zoom function stops working. This forces me to repeatedly switch between monitors.

Is there a way to make the zoom function work without constantly refocusing on the OBS preview? Any help or suggestions would be appreciated.
 

FTech3

New Member
Here's an edited version of your text:

@BlankSourceCode Thank you for this helpful plugin. I'm using a Mac with a secondary display monitor for creating programming tutorial videos. OBS is on my laptop, and I type on my second monitor. I've set up hotkeys 1 and 2 for zooming, but there's an issue:

Every time I want to use the zoom function, I have to:
1. Move my mouse pointer to the laptop screen
2. Click on the OBS preview
3. Use the zoom hotkeys

After typing on the second monitor, the zoom function stops working. This forces me to repeatedly switch between monitors.

Is there a way to make the zoom function work without constantly refocusing on the OBS preview? Any help or suggestions would be appreciated.
Never mind. My hot keys were the issue. I switched from using 1 and 2 to using COMMAND and SPACE BAR. It worked. I'll get a hardware solution for this. Thanks again.
 

Intellilogic

New Member
There's a lot of talk and I'm not sure what ended up being the best solution. I want to be able to zoom on 1 of my many monitors, a specific one that isn't the main in the aitum vertical window. It's at -3840 (left monitor from main) and 1600. I have this as the display capture. How should I setup the source in that vertical window to start? What code do I have to change to get it to work with this monitor?
 

GuiDaFunkyMan

New Member
Hi, my following question should seem dumb, but if we want to zoom in on our PC screen and check what happens on OBS in real-time, we need to have two separate PC screens, don't we? In short, this plug-in works well, but I don't know how to use it properly. Can anyone help me?
 
Top