Narsil / rdev

Simple library to listen and send events to keyboard and mouse (MacOS, Windows, Linux)
MIT License
534 stars 136 forks source link

[Feature request] Support for multi monitor setups #107

Open MrTanoshii opened 1 year ago

MrTanoshii commented 1 year ago

Test setup

Win10, Win11 2 monitors, main landscape 1080p, secondary portrait 1080 on the right side.

Problem

Code_ZtIVzCvaNu

The mouse destination does not match the intended location because or device_query using coordinates relative to the main screen (can be negative) while rdev uses absolute (top left is 0,0).

The MouseMove is attempting to get to y=-802 instead of y=-222 but gets stuck at y=-580 (the top most of my secondary screen)

There currently does not exist a method to query the secondary screen sizes to allow the conversion from the relative->absolute and vice versa.

Proposal

More info

https://github.com/MrTanoshii/rusty-autoclicker/issues/47

Narsil commented 1 year ago

PRs are welcome, but it's likely to be a major undertaking given we need support for all OSes and the various ways to handle multi screen.