mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
Update typestr
This commit is contained in:
parent
44d5984c2b
commit
9b817112a2
@ -46,8 +46,8 @@ import (
|
|||||||
// "fmt"
|
// "fmt"
|
||||||
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
// "runtime"
|
|
||||||
// "syscall"
|
// "syscall"
|
||||||
|
|
||||||
"github.com/go-vgo/robotgo/clipboard"
|
"github.com/go-vgo/robotgo/clipboard"
|
||||||
@ -503,7 +503,11 @@ func TypeString(x string) {
|
|||||||
// TypeStr type string, support UTF-8
|
// TypeStr type string, support UTF-8
|
||||||
func TypeStr(str string) {
|
func TypeStr(str string) {
|
||||||
clipboard.WriteAll(str)
|
clipboard.WriteAll(str)
|
||||||
KeyTap("v", "command")
|
if runtime.GOOS == "darwin" {
|
||||||
|
KeyTap("v", "command")
|
||||||
|
} else {
|
||||||
|
KeyTap("v", "control")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadAll read string from clipboard
|
// ReadAll read string from clipboard
|
||||||
|
Loading…
Reference in New Issue
Block a user