Commit 6568663d authored by qwelp's avatar qwelp

add delay for linux

parent 6d22fc21
package string2keyboard
import (
"runtime"
"time"
"github.com/micmonay/keybd_event"
)
......@@ -15,6 +18,11 @@ func KeyboardWrite(textInput string) error {
if err != nil {
return err
}
// For linux, it is very important wait 2 seconds
if runtime.GOOS == "linux" {
time.Sleep(2 * time.Second)
}
//Should we skip next character in string
//Used if we found some escape sequence
skip := false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment