Every time I use Robot to move the mouse, it resets the Windows mouse speed. This is really annoying to deal with, and I was wondering if anyone knows how to fix this. Here is basically the code I am messing around with:
Robot robot = new Robot();
robot.mouseMove(10, 1070);
robot.delay(300);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.delay(300);
robotType("notepad");
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
robot.delay(400);
robotType("I am writing this.");
What this does is essentaily click the start button, type "notepad", open notepad, then types "I am writing this".
robotType() is just a quick function I made that converts a string into a series of keyboard presses/releases.
This would appear to be a windows bug, as nothing you have done inherently alters the mouse speed. It seems you may be out of luck...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With