sendkeys

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 8 Imported by: 0

README

SendKeys

sendkeys is a Go program that simulates typing a string with random delays between each key press. The program can read the text to type either from a command-line argument or from a file.

Features

  • Simulates typing a string with random delays between keystrokes.
  • Supports upper and lower case letters, numbers, and common punctuation.
  • Reads input text from a command-line argument or from a file.
  • Customizable start delay and inter-key delay with variance.

Usage

Command-Line Arguments
  • -t int: Number of seconds to wait before starting (default: 5 seconds).
  • -i int: Interval in milliseconds between each key press (default: 75 milliseconds).
  • -v int: Variance of interval in milliseconds (default: 40 milliseconds).
  • -f string: Path to a file with text you wish to be typed.
  • -s string: String to type.
Example
go run main.go -t 5 -i 75 -v 40 -s "Hello, world!"

This command will:

  • Wait for 5 seconds.
  • Type the string "Hello, world!" with an interval of 75 milliseconds between each key press, plus a variance of 40 milliseconds. Alternatively, you can specify a file to read the text from:
go run main.go -t 5 -i 75 -v 40 -f example.txt

This command will:

  • Wait for 5 seconds.
  • Read the contents of example.txt and type it with the specified interval and variance.

Installation

Ensure you have Go installed on your system. You can download it from golang.org. Then to install run:

go install github.com/tateexon/sendkeys@latest

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL