Skip to content
Emulate key and mouse operation.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Project Version up with dependency packages. Jun 17, 2019
.gitignore Initial commit Nov 27, 2017
LICENSE
README.md

README.md

Friendly.Windows.KeyMouse

This library is a layer on top of Friendly, so you must learn that first. But it is very easy to learn.

https://github.com/Codeer-Software/Friendly.Windows

Features ...

Key mouse emulation can be performed on Windows applications at high speed and with high accuracy. This library is built on Friendly Layer. Valid for applications created with Win32, WinForms, WPF.

Please use it with these. Codeer.Friendly.Windows.NativeStandardControls Ong.Friendly.FormsStandardControls RM.Friendly.WPFStandardControls

Getting Started

PM> Install-Package Codeer.Friendly.Windows.KeyMouse

Samples.

These are extension methods.

using Codeer.Friendly.Windows.KeyMouse;

Keybord emulate.

var window = WindowControl.FromZTop(app);
var target = new FormsTextBox(window.Dynamic()._keyTest);

//The argument is the same specification as System.Windows.Forms.SendKeys.
target.SendKeys("aBc");

//CONTROL + Q
target.SendControlAndKey(Keys.Q);

//SHIFT + Q
target.SendShiftAndKey(Keys.A);

//ALT + Q
target.SendAltAndKey(Keys.Q);

//CONTROL + SHIFT + ALT + Q
target.SendModifyAndKey(true, true, true, Keys.Q);

Mouse emulate.

var window = WindowControl.FromZTop(app);
var target = new WindowControl(window.Dynamic()._mouseTest);

//Left click. The coordinates are the center of the control.
target.Click();

//Specify button and specify client coordinates.
target.Click(MouseButtonType.Middle, new Point(4, 5));

//Double click.
target.DoubleClick();
target.DoubleClick(MouseButtonType.Middle, new Point(4, 5));

//Drag & Drop.
var dropTarget = new WindowControl(window.Dynamic()._dropTest);
target.MouseDown(MouseButtonType.Left, new Point(0, 0));
dropTarget.MouseUp(MouseButtonType.Left, new Point(2, 3));

Keybord and Mouse emulate.

var window = WindowControl.FromZTop(app);
var target = new WindowControl(window.Dynamic()._keyMouseTest);

//ALT + MouseClick;
app.KeyDown(Keys.Menu);
target.Click():
app.KeyUp(Keys.Menu);
You can’t perform that action at this time.