how to get cursor position | come ottenere la posizione del cursore
hello, I would like to know if there is (or if you would be able to add) a function which allows me to get the current x and y coordinate positions of the mouse connected to the kmbox so that I can fully control the kmbox with my second computer. thank you!
ciao, vorrei sapere se esiste (o se potresti aggiungere) una funzione che mi permette di ottenere le attuali posizioni delle coordinate xey del mouse collegato al kmbox in modo da poter controllare completamente il kmbox con il mio secondo computer. Grazie!
def posA(self):
x1=win32api.GetCursorPos()[0]
y1=win32api.GetCursorPos()[1]
return int(x1), int(y1)
def posR(self):
screen_width, screen_height = self.get_screen_size()
x1,y1 = win32api.GetCursorPos()[0],win32api.GetCursorPos()[1]
x = -(screen_width / 2 - x1) if x1 < screen_width / 2 else x1 - screen_width / 2
y = -(screen_height / 2 - y1) if y1 < screen_height / 2 else y1 - screen_height / 2
return int(x), int(y)
##posA=ABSOLUTE POSITION ##posR=RELATIVE POSITION
I know, but I want to get it using the kmbox as I am controlling the kmbox from my second computer and not the one which the kmbox is connected to.
backtoback2814 discord
added! username is @kentyandayo