From b618176823503290cd9bab415d0c270823c59447 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Fri, 20 Apr 2018 23:19:22 +0800 Subject: [PATCH] update code and version --- key/keypress_c.h | 4 ++-- robotgo.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/key/keypress_c.h b/key/keypress_c.h index f41673e..d44e7da 100644 --- a/key/keypress_c.h +++ b/key/keypress_c.h @@ -225,8 +225,8 @@ void toggleUnicode(UniChar ch, const bool down) int min, max, numcodes; XDisplayKeycodes(dpy, &min, &max); KeySym *keysym; - keysym = XGetKeyboardMapping(dpy, min,max-min+1, &numcodes); - keysym[(max-min-1)*numcodes]=sym; + keysym = XGetKeyboardMapping(dpy, min, max-min+1, &numcodes); + keysym[(max-min-1)*numcodes] = sym; XChangeKeyboardMapping(dpy, min, numcodes, keysym, (max-min)); XFree(keysym); XFlush(dpy); diff --git a/robotgo.go b/robotgo.go index 50419dd..71a87c9 100644 --- a/robotgo.go +++ b/robotgo.go @@ -66,7 +66,7 @@ import ( ) const ( - version string = "v0.48.0.549, Ben Nevis!" + version string = "v0.48.0.556, Ben Nevis!" ) type ( @@ -692,7 +692,7 @@ func CharCodeAt(s string, n int) rune { return 0 } -func toUc(text string) []string { +func toUC(text string) []string { var uc []string textQuoted := strconv.QuoteToASCII(text) @@ -706,7 +706,7 @@ func toUc(text string) []string { return uc } -func inputUtf(str string) { +func inputUTF(str string) { cstr := C.CString(str) C.input_utf(cstr) @@ -716,9 +716,9 @@ func inputUtf(str string) { // TypeStr type string, support UTF-8 func TypeStr(str string) { if runtime.GOOS == "linux" { - strUc := toUc(str) + strUc := toUC(str) for i := 0; i < len(strUc); i++ { - inputUtf(strUc[i]) + inputUTF(strUc[i]) MicroSleep(7) } } else {