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?
 

johnyboyro

New Member
hello obs forum members,
i have a question to ask.
i badly need this feature, as i use for recording videos and to focus on figures.

what problems i am facing is.
i only have 1 screen, the i used hotkey, but it works only if obs is selected, if i go to another window it doesnt work.

and even if it did, how will i know if its zoom in or zoom out right now ?
i have to go to obs and check if its zoom in or zoom, which really breaks my rythm of making video.
i really want a solution on it.

or something like.. when i move my mouse it should follow and zoom and when i stop it should go back to normal.
please community help us with this.
 

NewUserNow

New Member
hello obs forum members,
i have a question to ask.
i badly need this feature, as i use for recording videos and to focus on figures.

what problems i am facing is.
i only have 1 screen, the i used hotkey, but it works only if obs is selected, if i go to another window it doesnt work.

and even if it did, how will i know if its zoom in or zoom out right now ?
i have to go to obs and check if its zoom in or zoom, which really breaks my rythm of making video.
i really want a solution on it.

or something like.. when i move my mouse it should follow and zoom and when i stop it should go back to normal.
please community help us with this.

I have encountered the same issue on my MacOs 15.0 M1. Any workaround for this?
 

albertocv

Member
Clicking on the question marks in the script settings doesn't do anything.
I'd like to know the meaning of the options:
- follow border
- lock sensitivity
- auto lock on reverse direction
 
Is there a way to force the loading of settings from the LUA file itself?

I want to have more than one LUA file, and when I load each, for the settings to be read in and populated.
 
Top