Closed MuriloMir closed 4 years ago
ok im gonna hit merge then do some fixes myself, it will be pretty different though
here's the way i coded it
https://github.com/adamdruppe/arsd/commit/136b4d0ad50bec88e2601ccb5c9bb53028f8134d
and a usage example:
import arsd.simpledisplay;
void main() {
SyntheticInput i = SyntheticInput(0);
i.pressKey(Key.Shift, true); // press and hold Shift
i.pressMouseButton(MouseButton.left, true); // hold left mouse button
i.moveMouseArrowBy(50, 10);
i.pressMouseButton(MouseButton.left, false); // release button
i.pressKey(Key.Shift, false); // release shift
i.sendSyntheticInput("ok cool"); // send a plain ascii string
}
by putting it in the object i could load the library without a new build dependency and sort the api out a little. It is also next to the Windows function in the file so if we want to add more Windows functions it can follow the same pattern.
I've just moved those 2 functions to simpledisplay.