mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +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" {
|
if runtime.GOOS == "linux" {
|
||||||
strUc := toUC(str)
|
strUc := toUC(str)
|
||||||
for i := 0; i < len(strUc); i++ {
|
for i := 0; i < len(strUc); i++ {
|
||||||
inputUTF(strUc[i])
|
rstr := []rune(strUc[i])
|
||||||
MicroSleep(tm)
|
if len(rstr) <= 1 {
|
||||||
|
ustr := uint32(CharCodeAt(strUc[i], 0))
|
||||||
|
UnicodeType(ustr)
|
||||||
|
} else {
|
||||||
|
inputUTF(strUc[i])
|
||||||
|
MicroSleep(tm)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user