-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hello! I seem to be having some issues with the Mouse.MoveMouseBy method. The method seems to move the mouse cursor by about three times the values passed to the deltaX and deltaY parameters. Using a screen ruler and calling:
InputSimulator.Mouse.MoveMouseBy(1300, 0);
meaning 1300 pixels on the positive horizontal axis results in the mouse being moved all the way across the screen which is much more than 1300 pixels. This holds similarly true for the vertical axis:
InputSimulator.Mouse.MoveMouseBy(0, 300);
where the mouse ends up approximately somewhere beyond 900 pixels on the positive vertical axis.
For testing I have used a screen ruler that seems to be correct since I have made it extend all the way across my screen resolution on both horizontal and vertical axes and it fits perfectly, as well as the following simple code:
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsInput;
namespace InputSimulatorPlusTest
{
public partial class Form1 : Form
{
private readonly InputSimulator _inputSimulator;
public Form1()
{
InitializeComponent();
_inputSimulator = new InputSimulator();
}
private async void Form1_OnShown(object sender, EventArgs e)
{
await Task.Delay(10000);
_inputSimulator.Mouse.MoveMouseBy(0, 300);
}
}
}
Is this a known issue, am I missing something and, if it is a bug, could it be fixed? Thanks!