![]() |
VOOZH | about |
dotnet add package H.InputSimulator --version 1.5.0
NuGet\Install-Package H.InputSimulator -Version 1.5.0
<PackageReference Include="H.InputSimulator" Version="1.5.0" />
<PackageVersion Include="H.InputSimulator" Version="1.5.0" />Directory.Packages.props
<PackageReference Include="H.InputSimulator" />Project file
paket add H.InputSimulator --version 1.5.0
#r "nuget: H.InputSimulator, 1.5.0"
#:package H.InputSimulator@1.5.0
#addin nuget:?package=H.InputSimulator&version=1.5.0Install as a Cake Addin
#tool nuget:?package=H.InputSimulator&version=1.5.0Install as a Cake Tool
Allows you to simulate global mouse and keyboard events. Features:
Supported OS:
Install-Package H.InputSimulator
new InputSimulator().Keyboard
.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_A)
.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_C)
.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_V);
new InputSimulator().Keyboard
.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.VK_E);
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);
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();
Please think of the library as a high-level wrapper over Win32 SendInput call.
Unfortunately, this is a limitation of the API itself, according to this documentation:
The easiest way to get around this is to run your application as an administrator.
Priority place for bugs: https://github.com/HavenDV/H.InputSimulator/issues
Priority place for ideas and general questions: https://github.com/HavenDV/H.InputSimulator/discussions
I also have a Discord support channel:
https://discord.gg/g8u2t9dKgE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on H.InputSimulator:
| Package | Downloads |
|---|---|
|
BioCore
A .NET library & program for annotating, & editing various microscopy imaging formats using Bioformats supported images. including whole slide, pyramidal & series. |
|
|
H.Runners.KeyboardRunner
Allows you to send keyboard events to system. |
|
|
BioImager
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include Prior® & Zeiss® & all devices supported by Micromanager 2.0 and python-microscope. |
|
|
Syntellect.Winium.Cruciatus
C# Framework for Windows applications automated testing. |
|
|
QAGuys.Winium.Cruciatus
C# Framework for Windows applications automated testing. |
Showing the top 5 popular GitHub repositories that depend on H.InputSimulator:
| Repository | Stars |
|---|---|
|
STranslate/STranslate
A ready-to-go translation ocr tool developed with WPF/WPF 开发的一款即用即走的翻译、OCR工具
|
|
|
Scighost/Starward
Game Launcher for miHoYo - 米家游戏启动器
|
|
|
ayufan/steam-deck-tools
(Windows) Steam Deck Tools - Fan, Overlay, Power Control and Steam Controller for Windows
|
|
|
Jorixon/JASM
Just Another Skin Manager
|
|
| mann1x/CPUDoc |
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.0 | 117,527 | 12/10/2024 |
| 1.4.2 | 31,757 | 7/4/2024 |
| 1.4.1 | 96,085 | 10/16/2023 |
| 1.4.0 | 9,257 | 7/14/2023 |
| 1.3.0 | 16,592 | 8/1/2022 |
| 1.2.6 | 7,384 | 3/27/2022 |
| 1.2.5 | 3,061 | 3/23/2022 |
| 1.2.4 | 3,025 | 3/23/2022 |
| 1.2.3 | 3,600 | 2/15/2022 |
| 1.2.1 | 6,004 | 10/26/2021 |
| 1.1.0 | 7,293 | 1/20/2021 |
| 1.0.9 | 3,091 | 1/20/2021 |
| 1.0.8 | 3,273 | 1/20/2021 |