update godoc and paste string name

This commit is contained in:
vcaesar 2018-01-17 19:06:23 +08:00
parent e1444437c2
commit 4ff2a48182

View File

@ -697,21 +697,21 @@ func TypeStr(str string) {
} }
} }
// UnicodeType unicode tap uint32 // UnicodeType tap uint32 unicode
func UnicodeType(str uint32) { func UnicodeType(str uint32) {
cstr := C.uint(str) cstr := C.uint(str)
C.unicodeType(cstr) C.unicodeType(cstr)
} }
// TypeString type string // TypeString type string, support unicode
func TypeString(x string) { func TypeString(x string) {
cx := C.CString(x) cx := C.CString(x)
C.type_string(cx) C.type_string(cx)
defer C.free(unsafe.Pointer(cx)) defer C.free(unsafe.Pointer(cx))
} }
// TypeStrP paste string, support UTF-8 // PasteStr paste string, support UTF-8
func TypeStrP(str string) { func PasteStr(str string) {
clipboard.WriteAll(str) clipboard.WriteAll(str)
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
KeyTap("v", "command") KeyTap("v", "command")