From 9b817112a24efe29ffb308b842a79f3f82e19c45 Mon Sep 17 00:00:00 2001 From: vCaesar Date: Sun, 11 Jun 2017 20:26:42 +0800 Subject: [PATCH] Update typestr --- robotgo.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/robotgo.go b/robotgo.go index 6217232..e2b1554 100644 --- a/robotgo.go +++ b/robotgo.go @@ -46,8 +46,8 @@ import ( // "fmt" "reflect" + "runtime" "unsafe" - // "runtime" // "syscall" "github.com/go-vgo/robotgo/clipboard" @@ -503,7 +503,11 @@ func TypeString(x string) { // TypeStr type string, support UTF-8 func TypeStr(str string) { clipboard.WriteAll(str) - KeyTap("v", "command") + if runtime.GOOS == "darwin" { + KeyTap("v", "command") + } else { + KeyTap("v", "control") + } } // ReadAll read string from clipboard