fmt and update keytoggle code

This commit is contained in:
vcaesar 2018-02-03 16:24:49 +08:00
parent e0f9739fa2
commit 8a94d16c46

View File

@ -63,7 +63,7 @@ import (
)
const (
version string = "v0.48.0.505, Ben Nevis!"
version string = "v0.48.0.506, Ben Nevis!"
)
type (
@ -630,24 +630,23 @@ func KeyToggle(args ...string) string {
// keyDelay = 10
)
Try(func() {
if len(args) > 1 {
adown = args[1]
if len(args) > 2 {
amkey = args[2]
Try(func() {
if len(args) > 3 {
mKeyT = args[3]
}, func(e interface{}) {
// fmt.Println("err:::", e)
} else {
mKeyT = "null"
})
}
} else {
amkey = "null"
}
}, func(e interface{}) {
// fmt.Println("err:::", e)
} else {
adown = "null"
})
}
ckey := C.CString(args[0])
cadown := C.CString(adown)