CSInputs.Core
1.1.1
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
dotnet add package CSInputs.Core --version 1.1.1
NuGet\Install-Package CSInputs.Core -Version 1.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSInputs.Core" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSInputs.Core" Version="1.1.1" />
<PackageReference Include="CSInputs.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSInputs.Core --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CSInputs.Core, 1.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CSInputs.Core@1.1.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CSInputs.Core&version=1.1.1
#tool nuget:?package=CSInputs.Core&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CSInputs
This library allows you to send and read mouse / keyboard inputs even when app window inactive.
WinForms / Console Application
.NET Framework 4.8+ netcore 8.0+<br/><br/>
Installation
You can install this package from Nuget Package Manager.
Install-Package CSInputs.Core
OR
dotnet add package CSInputs.Core
<br/>
Usage Examples
-Send Inputs
Keyboard Inputs:
SendInput.Keyboard.Send(KeyboardKeys.F1);
SendInput.Keyboard.Send(KeyboardKeys.F1,Enums.KeyFlags.Down);
SendInput.Keyboard.Send(KeyboardKeys.F1,Enums.KeyFlags.Up);
SendInput.Keyboard.SendChar('A');
SendInput.Keyboard.SendString("Hello World!");
<br/>
Mouse Inputs:
SendInput.Mouse.Send(MouseKeys.MouseLeft);
SendInput.Mouse.Send(MouseKeys.MouseLeft,Enums.KeyFlags.Down);
SendInput.Mouse.Send(MouseKeys.MouseLeft,Enums.KeyFlags.Up);
SendInput.Mouse.Send(MouseKeys.MouseLeft, KeyFlags.Down,new Point(150, 123),MousePositioning.Absolute);
SendInput.Mouse.Send(MouseKeys.MouseLeft, KeyFlags.Down,new Point(-5, -30),MousePositioning.Relative);
SendInput.Mouse.MoveTo(new Point(150, 123), Enums.MousePositioning.Absolute);
-Listen Inputs
First you need to instantiate a input listener.
ReadInput.InputListener listener = new ReadInput.InputListener();
Then you can subscribe for keyboard or mouse events to listen inputs.
listener.KeyboardInputs += Listener_KeyboardInputs;
listener.MouseInputs += Listener_MouseInputs;
-Sample Console Application
using System;
//System.Windows.Forms is required to work on console applications. so dont forget to add the reference.
using System.Windows.Forms;
using CSInputs.Enums;
using CSInputs.ReadInput;
using CSInputs.Structs;
internal class Program
{
static void Main(string[] args)
{
// Instantiate InputListener
InputListener inputListener = new InputListener();
// Subscribe to KeyboardInputs event handler to listen keyboard inputs.
inputListener.KeyboardInputs += InputListener_KeyboardInputs;
// Subscribe to MouseInputs event handler to listen mouse inputs.
inputListener.MouseInputs += InputListener_MouseInputs;
Application.Run(); // Required to work on console applications,
}
private static void InputListener_MouseInputs(MouseData data, ref ModifierKey modifierKey)
{
if (data.Key == MouseKeys.MouseRight && data.Flags == KeyFlags.KeyUp)
Console.WriteLine("Someone just released the \"Right Click\"!");
}
private static void InputListener_KeyboardInputs(KeyboardData data, ref ModifierKey modifierKey)
{
if (data.Key == KeyboardKeys.Space && data.Flags == KeyFlags.KeyUp)
Console.WriteLine("Someone just released the \"Space\" key!");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- No dependencies.
-
net10.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.1 | 96 | 5/5/2026 |