H.InputSimulator 1.2.1

Install-Package H.InputSimulator -Version 1.2.1
dotnet add package H.InputSimulator --version 1.2.1
<PackageReference Include="H.InputSimulator" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add H.InputSimulator --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: H.InputSimulator, 1.2.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install H.InputSimulator as a Cake Addin
#addin nuget:?package=H.InputSimulator&version=1.2.1

// Install H.InputSimulator as a Cake Tool
#tool nuget:?package=H.InputSimulator&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

H.InputSimulator

Language License Requirements Build Status

Allows you to simulate global mouse and keyboard events. Features:

  • Supports scan codes and multi-language input.
  • Supports WPF/WinForms/Console windows apps.
  • Supports .NET Standard, .Net Core and .Net 5.

Supported OS:

  • Windows

Nuget

NuGet

Install-Package H.InputSimulator

Examples

SelectCopyPaste

new InputSimulator().Keyboard
    .ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_A)
    .ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_C)
    .ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_V);

OpenWindowsExplorer

new InputSimulator().Keyboard
    .ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.VK_E);

SelfDestructMessage

new InputSimulator().Keyboard
    .ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.VK_R)
    .Sleep(1000)
    .TextEntry("notepad")
    .Sleep(1000)
    .KeyPress(VirtualKeyCode.RETURN)
    .Sleep(1000)
    .TextEntry("These are your orders if you choose to accept them...")
    .TextEntry("This message will self destruct in 5 seconds.")
    .Sleep(5000)
    .ModifiedKeyStroke(VirtualKeyCode.MENU, VirtualKeyCode.F4)
    .KeyPress(VirtualKeyCode.VK_N);

OpenPaintAndCreateLine

new InputSimulator().Keyboard
    .ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.VK_R)
    .Sleep(1000)
    .TextEntry("mspaint")
    .Sleep(1000)
    .KeyPress(VirtualKeyCode.RETURN)
    .Sleep(1000)
    .Mouse
    .LeftButtonDown()
    .MoveMouseToPositionOnVirtualDesktop(65535 / 2, 65535 / 2)
    .LeftButtonUp();

Contacts

  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 1.1

  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on H.InputSimulator:

Package Downloads
H.Runners.KeyboardRunner

Allows you to send keyboard events to system.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on H.InputSimulator:

Repository Stars
CopyPlusPlus/CopyPlusPlus
让复制变得更加简单!
Version Downloads Last updated
1.2.1 302 10/26/2021
1.1.0 3,197 1/20/2021
1.0.9 186 1/20/2021
1.0.8 179 1/20/2021

⭐ Last 10 features:
- feat: Added README to NuGet package. To net 6.0. 2021-10-26
- feat: Added tests. 2021-01-20
- feat: Added library code. 2021-01-20
- feat: Updated description. 2021-01-20

🐞 Last 10 bug fixes: