mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 23:53:54 +00:00
fix keytap some error and fmt code
This commit is contained in:
parent
214ac59298
commit
883e9c24a9
@ -62,7 +62,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.47.0.448, Mount Cook!"
|
||||
version string = "v0.47.0.449, Mount Cook!"
|
||||
)
|
||||
|
||||
type (
|
||||
@ -508,18 +508,20 @@ func KeyTap(args ...interface{}) {
|
||||
ckeyArr = append(ckeyArr, (*C.char)(unsafe.Pointer(C.CString(keyArr[i]))))
|
||||
}
|
||||
|
||||
if len(args) > 3 {
|
||||
if len(args) > 2 {
|
||||
keyDelay = args[2].(int)
|
||||
}
|
||||
} else {
|
||||
akey = args[1].(string)
|
||||
|
||||
if len(args) > 2 {
|
||||
if reflect.TypeOf(args[2]) == reflect.TypeOf(akey) {
|
||||
keyT = args[2].(string)
|
||||
} else {
|
||||
keyDelay = args[2].(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}, func(e interface{}) {
|
||||
// fmt.Println("err:::", e)
|
||||
|
Loading…
Reference in New Issue
Block a user