Skip to content

quantcat26/inputs_emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inputs Emulator

Introduction

This is a simple command-line tool for macOS designed to monitor and simulate keyboard and mouse input events. You can use it to record a sequence of actions and then replay (simulate) them.

Key Features

  • Event Monitoring: Records keyboard key presses/releases and mouse actions (movements, clicks, scrolls).
  • Event Management:
    • Display recorded keyboard or mouse events.
    • Sort events by timestamp.
    • Clear recorded events.
  • Save & Load:
    • Save the recorded event sequence to a file.
    • Load an event sequence from a file.
  • Simulation:
    • Automatically execute simulated keyboard and mouse actions based on the loaded or recorded event sequence.
  • Status Display: Check the current status of the monitor (running or stopped).

Requirements

  • Operating System: macOS
  • Compiler: A C++14 compliant compiler (e.g., g++ or clang)
  • Framework: macOS ApplicationServices Framework (configured in the makefile)

Build Instructions

  1. Get the Source Code:

    # If cloning from a Git repository
    git clone <your-repository-url>
    cd inputs_emulator
    # Ignore git clone if you are already in the local project directory
  2. Clean (Optional): Remove previous build files.

    make clean
  3. Compile: Use the makefile to compile the project.

    make

    Upon successful compilation, the executable input_simulator will be generated in the debug/ directory.

Usage

  1. Run the Application: In your terminal, navigate to the project's root directory and execute:

    ./debug/input_simulator
  2. Main Menu: The application will display a menu. Enter the corresponding number to select an action:

    • [1] Exit the application.
    • [2] Start Monitor: Begin recording keyboard and mouse events. Press the Escape key to stop monitoring.
    • [3-5] Print Events: View recorded keyboard, mouse, or all events.
    • [6] Sort Events: Sort all events chronologically (recommended before simulation).
    • [7] Clear Events: Delete all recorded events.
    • [8] Save Events: Save the currently recorded events to a specified file.
    • [9] Load Events: Load events from a specified file, overwriting any current events.
    • [10] Run Simulation: Execute the simulated actions based on the currently loaded/recorded event sequence.
    • [11] Show Status: Check if the monitor is currently running or stopped.

To-do

  • Add support for more event types (e.g., modifier keys, precise drag simulation).
  • Provide more detailed error handling and user feedback.
  • Develop a graphical user interface (GUI).

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors