Skip to content

About

Bash script used to simulate keystrokes

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Bash-keystroker


This script will simulate keystrokes.

#Usage
Usage is "path/to/script.sh" "numer of times to stroke(required)" "what to keystroke(not required, leave blank for default(e))" "pre loop sleep(not required, leave blank for default(5))" "mode (keystroke or cp, more on this later (not required, leave blank for default(keystroke))"

What mode should I use?

This depends on what you want to keystroke. The default method, "keystroke", will simply stroke whatever you tell it to do, letter by letter. This is very fast if you are keystroking one letter, but will slow down if you increase the number of letters to use.

The method "cp" on the other hand works very differently. Instead of parsing each letter one by one, it parses the whole word (or words, depending on what you used as $2). This is very slow for single letter strokes, but very fast if keystroking longer words.


Let's look at the stats.

"keystroke" will stroke about 30-80 letters per second, depending on $2 length. The longer it is the faster. "cp" on the other hand will stroke about 10 blocks per second(where 1 block is your $3). This means it is more effective to use "cp" if your intention is to keystroke a word with more than 8 characters.

Examples



Keystroking 10 "e" (with default setting for sleep(5) and mode(keystroke)
./Keystroker.sh 10 "e"

Keystroking 10 "e" using "keystroke"
./Keystroker.sh 10 "e" "5" "keystroke"

Keystroking 10 "testtext" using "cp"
./Keystroker.sh 10 "testtext" "5" "cp"

Keystroking 1 line of all numbers from 1 to 100 using "keystroke"
./Keystroker.sh 1 "$(echo {1..100})" "5" "keystroke"

About

Bash script used to simulate keystrokes

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages