mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-05 16:23:55 +00:00
update some var name and merge some func
This commit is contained in:
parent
35215c9e70
commit
94423c71ec
12
robotgo.go
12
robotgo.go
@ -698,9 +698,9 @@ func toUC(text string) []string {
|
|||||||
textQuoted := strconv.QuoteToASCII(text)
|
textQuoted := strconv.QuoteToASCII(text)
|
||||||
textUnquoted := textQuoted[1 : len(textQuoted)-1]
|
textUnquoted := textQuoted[1 : len(textQuoted)-1]
|
||||||
|
|
||||||
sUnicodev := strings.Split(textUnquoted, "\\u")
|
strUnicodev := strings.Split(textUnquoted, "\\u")
|
||||||
for i := 1; i < len(sUnicodev); i++ {
|
for i := 1; i < len(strUnicodev); i++ {
|
||||||
uc = append(uc, "U"+sUnicodev[i])
|
uc = append(uc, "U"+strUnicodev[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
return uc
|
return uc
|
||||||
@ -771,11 +771,7 @@ func TypeStrDelay(str string, delay int) {
|
|||||||
|
|
||||||
// TypeStringDelayed type string delayed, Wno-deprecated
|
// TypeStringDelayed type string delayed, Wno-deprecated
|
||||||
func TypeStringDelayed(str string, delay int) {
|
func TypeStringDelayed(str string, delay int) {
|
||||||
cstr := C.CString(str)
|
TypeStrDelay(str, delay)
|
||||||
cdelay := C.size_t(delay)
|
|
||||||
C.type_string_delayed(cstr, cdelay)
|
|
||||||
|
|
||||||
defer C.free(unsafe.Pointer(cstr))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetKeyDelay set keyboard delay
|
// SetKeyDelay set keyboard delay
|
||||||
|
Loading…
Reference in New Issue
Block a user