Input 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Input --version 1.0.1                
NuGet\Install-Package Input -Version 1.0.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="Input" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Input --version 1.0.1                
#r "nuget: Input, 1.0.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.
// Install Input as a Cake Addin
#addin nuget:?package=Input&version=1.0.1

// Install Input as a Cake Tool
#tool nuget:?package=Input&version=1.0.1                

Input

멀티 플랫폼 키보드 및 마우스 후킹, 입력

📖 Wiki

Input 위키

input.test

API 사용 테스트 도구입니다.

📦 Install

패키지 설치 방법

  • Package Manager
    Install-Package Input -Version 1.0.0
    
  • .NET CLI
    dotnet add package Input --version 1.0.0
    

📚 Samples

더 많은 샘플은 Example에서 확인할 수 있습니다.

Hook

키보드 및 마우스 후킹 예제입니다.

  • ⌨️ Keyboard Hook

    using Input;
    using System.Diagnostics;
    using Input.Platforms.Windows;
    
    var hook = Inputs.Use<IKeyboardHook>();
    var model = hook.KeyboardModel;
    
    model.KeyDown += (sender, key, state) => {
      Debug.WriteLine($"KeyDown: {key} {state}");
      return true;
    };
    
    model.KeyUp += (sender, key, state) => {
      Debug.WriteLine($"KeyDown: {key} {state}");
      return true;
    };
    
    hook.HookStart();
    
    if (Platform.IsWindows)
      while (WindowsMessagePump.Pumping()) { }
    
    Console.ReadLine();
    

    자세한 예제는 여기에서 확인할 수 있습니다.

  • 🖱️ Mouse Hook

    using Input;
    using Input.Platforms.Windows;
    using System.Diagnostics;
    
    var hook = Inputs.Use<IKeyboardHook>();
    var model = hook.KeyboardModel;
    
    model.KeyDown += (sender, key, state) => {
        Debug.WriteLine($"KeyDown: {key} {state}");
        return true;
    };
    
    model.KeyUp += (sender, key, state) => {
        Debug.WriteLine($"KeyDown: {key} {state}");
        return true;
    };
    
    hook.HookStart();
    
    if (Platform.IsWindows)
      while (WindowsMessagePump.Pumping()) { }
    
    Console.ReadLine();
    

    자세한 예제는 여기에서 확인할 수 있습니다.

Simulation

키보드 및 마우스 시뮬레이션 예제입니다.

  • ⌨️ Keyboard Simulation

    using Input;
    using System.Diagnostics;
    
    var simulation = Inputs.Use<IKeyboardSimulation>();
    
    // 1.1 KeyClick
    
    simulation.KeyClick(InputKeys.A);
    
    simulation.KeyClick(InputKeys.LeftControl, InputKeys.Z);
    
    // 1.2 KeyDown
    
    simulation.KeyDown(InputKeys.A);
    
    simulation.KeyDown(InputKeys.A, InputKeys.B);
    
    // 1.3 KeyUp
    
    simulation.KeyUp(InputKeys.A);
    
    simulation.KeyUp(InputKeys.A, InputKeys.B);
    
    // 1.4 TextEntry
    
    simulation.TextEntry("Hello, World!");
    
    // 1.5 IsKeyDown
    
    simulation.IsKeyDown(InputKeys.A);
    
    // 1.6 ReleaseAllKeys
    
    simulation.ReleaseAllKeys();
    

    자세한 예제는 여기에서 확인할 수 있습니다.

  • 🖱️ Mouse Simulation

    using Input;
    using System.Diagnostics;
    
    var simulation = Inputs.Use<IMouseSimulation>();
    
    simulation.Debug = true;
    
    // 1.1 Click
    
    simulation.Click();
    
    simulation.Click(10, 10);
    
    simulation.Click(InputMouseButtons.Right);
    
    simulation.Click(InputMouseButtons.Right, 10, 10);
    
    simulation.AbsoluteClick(100, 100);
    
    simulation.AbsoluteClick(InputMouseButtons.Right, 100, 100);
    
    // 1.2 Down
    
    simulation.Down(InputMouseButtons.Left);
    
    simulation.Down(InputMouseButtons.Left, 10, 10);
    
    simulation.AbsoluteDown(InputMouseButtons.Left, 100, 100);
    
    // 1.3 Up
    
    simulation.Up(InputMouseButtons.Left);
    
    simulation.Up(InputMouseButtons.Left, 10, 10);
    
    simulation.AbsoluteUp(InputMouseButtons.Left, 100, 100);
    
    // 1.4 Move
    
    simulation.Move(10, 10);
    
    simulation.AbsoluteMove(100, 100);
    
    // 1.5 Scroll
    
    simulation.Scroll(1);
    simulation.ScrollUp(1);
    
    simulation.Scroll(-1);
    simulation.ScrollDown(1);
    
    // 1.6 Mouse State
    
    simulation.GetMousePosition(out var x, out var y);
    
    simulation.IsMouseDown(InputMouseButtons.Left);
    

    자세한 예제는 여기에서 확인할 수 있습니다.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • 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.0.3 696 7/29/2022
1.0.2 402 6/6/2022
1.0.1 554 12/7/2021
1.0.0 449 12/7/2021