Python Forum

Full Version: Read mouse position on separate between two HDMIs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need help with the reading the mouse position on each HDMI.
I have two HDMI outputs.
I need like this:
One reading mouse X Y on HDMI 0
AND
One reading mouse X Y on HDMI 1.

my issue is the reading mouse does sub from HDMI-0 and HDMI-1.

HDMI-0 supposed be up to 480 x 800.

HDMI-1 supposed be up to 1920 x 1080.

when I move the mouse to second HDMI it show me over 1920 x 1080 like 2037 x 1223 which I do not want that.

here the EXAMPLE of code in my goal is:
from pynput.mouse import Controller

mouse = Controller

mouse_in_HDMI_0 = mouse.position.hdmi-0
print("HDMI0 mouse:"+str(mouse_in_HDMI_0))

mouse_in_HDMI_1 = mouse.position.hdmi-1
print("HDMI1 mouse:"+str(mouse_in_HDMI_1))
I know that code is not working but need help.
THANKS!
Do the python have code to read which HDMI the mouse is on?
Like when I move the mouse to HDMI-1 then the print tell me it is HDMI-1 and if I move to HDMI-0 then it tell me it's HDMI-0...

thanks!