mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
Update TypeStr function, optimize x11 type string
This commit is contained in:
parent
9255eff980
commit
1d1ed41db2
10
robotgo.go
10
robotgo.go
@ -730,8 +730,14 @@ func TypeStr(str string, args ...float64) {
|
||||
if runtime.GOOS == "linux" {
|
||||
strUc := toUC(str)
|
||||
for i := 0; i < len(strUc); i++ {
|
||||
inputUTF(strUc[i])
|
||||
MicroSleep(tm)
|
||||
rstr := []rune(strUc[i])
|
||||
if len(rstr) <= 1 {
|
||||
ustr := uint32(CharCodeAt(strUc[i], 0))
|
||||
UnicodeType(ustr)
|
||||
} else {
|
||||
inputUTF(strUc[i])
|
||||
MicroSleep(tm)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user