From 3a313c2cf04129a704c662353be8850734bfccf2 Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Wed, 4 Jan 2023 22:36:01 +0000 Subject: [PATCH] add default delays --- dotool.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dotool.go b/dotool.go index d83c909..b8141e4 100644 --- a/dotool.go +++ b/dotool.go @@ -135,10 +135,10 @@ The commands are: scroll NUMBER (where NUMBER is the amount down/up if positive/negative) mouseto X Y (where X and Y are percentages between 0.0 and 1.0) mousemove X Y (where X and Y are the number of pixels to move) - keydelay MILLISECONDS - keyhold MILLISECONDS - typedelay MILLISECONDS - typehold MILLISECONDS + keydelay MILLISECONDS (default: 2) + keyhold MILLISECONDS (default: 8) + typedelay MILLISECONDS (default: 2) + typehold MILLISECONDS (default: 8) Example: echo "key h i shift+1" | dotool @@ -245,10 +245,10 @@ func main() { } defer mouse.Close() - keydelay := time.Duration(0) - keyhold := time.Duration(0) - typedelay := time.Duration(0) - typehold := time.Duration(0) + keydelay := time.Duration(2)*time.Millisecond + keyhold := time.Duration(8)*time.Millisecond + typedelay := time.Duration(2)*time.Millisecond + typehold := time.Duration(8)*time.Millisecond sc := bufio.NewScanner(os.Stdin) for sc.Scan() {