All Projects → GregsStack → InputSimulatorStandard

GregsStack / InputSimulatorStandard

Licence: MIT license
Input Simulator Standard

Projects that are alternatives of or similar to InputSimulatorStandard

LowLevelInput.Net
A thread safe and event driven LowLevelMouse and LowLevelKeyboard Hook
Stars: ✭ 32 (-40.74%)
Mutual labels:  input, mouse
openinput
Open source firmware for input devices
Stars: ✭ 43 (-20.37%)
Mutual labels:  input, mouse
Key Mapper
🎮 An easy to use tool to change the mapping of your input device buttons.
Stars: ✭ 184 (+240.74%)
Mutual labels:  input, mouse
Neatinput
A .NET standard project which aims to make keyboard and mouse input monitoring easy on Windows and eventually Linux.
Stars: ✭ 89 (+64.81%)
Mutual labels:  input, mouse
Inputsystem
An efficient and versatile input system for Unity.
Stars: ✭ 1,013 (+1775.93%)
Mutual labels:  input, mouse
input-event
🎹 Read and parse input device(like mouse, keyboard, joystick and IR-Remote)'s event data.
Stars: ✭ 45 (-16.67%)
Mutual labels:  input, mouse
rapp
Cross-platform entry point library
Stars: ✭ 57 (+5.56%)
Mutual labels:  input, mouse
Gainput
Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch
Stars: ✭ 636 (+1077.78%)
Mutual labels:  input, mouse
Pc Optimization Hub
collection of various resources devoted to performance and input lag optimization
Stars: ✭ 55 (+1.85%)
Mutual labels:  input, mouse
Enigo
Cross platform input simulation in Rust
Stars: ✭ 254 (+370.37%)
Mutual labels:  input, mouse
Autopilot Rs
A simple, cross-platform GUI automation module for Rust.
Stars: ✭ 168 (+211.11%)
Mutual labels:  input
Bootstrap Input Spinner
A Bootstrap 4 / jQuery plugin to create input spinner elements for number input
Stars: ✭ 176 (+225.93%)
Mutual labels:  input
React Code Input
React component for entering and validating PIN code.
Stars: ✭ 207 (+283.33%)
Mutual labels:  input
React Native Input Spinner
An extensible input number spinner component for react-native highly customizable. This component enhance a text input for entering numeric values, with increase and decrease buttons.
Stars: ✭ 155 (+187.04%)
Mutual labels:  input
React Selectrix
A beautiful, materialized and flexible React Select control
Stars: ✭ 166 (+207.41%)
Mutual labels:  input
Wickedengine
3D engine focusing on modern rendering techniques and performance.
Stars: ✭ 3,148 (+5729.63%)
Mutual labels:  input
Underlinetextfield
Simple UITextfield Subclass with state
Stars: ✭ 156 (+188.89%)
Mutual labels:  input
Klaklasp
An extension for the Klak Wiring system to create audio reactive behaviors.
Stars: ✭ 150 (+177.78%)
Mutual labels:  input
Decoders
Elegant validation library for type-safe input data (for TypeScript and Flow)
Stars: ✭ 246 (+355.56%)
Mutual labels:  input
Rangetouch
A super tiny library to make `<input type='range'>` sliders work better on touch devices
Stars: ✭ 224 (+314.81%)
Mutual labels:  input

Input Simulator Standard

This library is a fork of Michael Noonan's Windows Input Simulator and Theodoros Chatzigiannakis's Input Simulator Plus (a C# wrapper around the SendInput functionality of Windows). It can be used as a replacement of the original library with some small source code changes.

This fork supports scan codes, making it compatible with many applications that the original library does not support.

The target framework has been changed to .Net Standard to support the usage with .Net Core and .Net Framework projects on Windows.

Nuget (with prereleases) Build Status codecov

Examples

Example: Single key press

public void PressTheSpacebar()
{
    var simulator = new InputSimulator();
    simulator.Keyboard.KeyPress(VirtualKeyCode.SPACE);
}

Example: Key-down and Key-up

public void ShoutHello()
{
    var simulator = new InputSimulator();

    // Simulate each key stroke
    simulator.Keyboard.KeyDown(VirtualKeyCode.SHIFT);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_H);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_E);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_L);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_L);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_O);
    simulator.Keyboard.KeyPress(VirtualKeyCode.VK_1);
    simulator.Keyboard.KeyUp(VirtualKeyCode.SHIFT);

    // Alternatively you can simulate text entry to acheive the same end result
    simulator.Keyboard.TextEntry("HELLO!");
}

Example: Modified keystrokes such as CTRL-C

public void SimulateSomeModifiedKeystrokes()
{
    var simulator = new InputSimulator();

    // CTRL-C (effectively a copy command in many situations)
    simulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_C);

    // You can simulate chords with multiple modifiers
    // For example CTRL-K-C whic is simulated as
    // CTRL-down, K, C, CTRL-up
    simulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.CONTROL, new [] {VirtualKeyCode.VK_K, VirtualKeyCode.VK_C});

    // You can simulate complex chords with multiple modifiers and key presses
    // For example CTRL-ALT-SHIFT-ESC-K which is simulated as
    // CTRL-down, ALT-down, SHIFT-down, press ESC, press K, SHIFT-up, ALT-up, CTRL-up
    simulator.Keyboard.ModifiedKeyStroke(
        new[] { VirtualKeyCode.CONTROL, VirtualKeyCode.MENU, VirtualKeyCode.SHIFT },
        new[] { VirtualKeyCode.ESCAPE, VirtualKeyCode.VK_K });
}

Example: Simulate text entry

public void SayHello()
{
    var simulator = new InputSimulator();
    simulator.Keyboard.TextEntry("Say hello!");
}

Example: Determine the state of different types of keys

public void GetKeyStatus()
{
    var simulator = new InputSimulator();

    // Determines if the shift key is currently down
    var isShiftKeyDown = simulator.InputDeviceState.IsKeyDown(VirtualKeyCode.SHIFT);

    // Determines if the caps lock key is currently in effect (toggled on)
    var isCapsLockOn = simulator.InputDeviceState.IsTogglingKeyInEffect(VirtualKeyCode.CAPITAL);
}

Example: Get current mouse position

public void GetMousePosition()
{
    var simulator = new InputSimulator();

    // Gets the mouse position as System.Drawing.Point
    var position = simulator.Mouse.Position;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].