update code name style

This commit is contained in:
vcaesar 2018-09-04 14:02:27 -04:00
parent 1e8f73884e
commit 76898b335b
3 changed files with 13 additions and 13 deletions

View File

@ -9,7 +9,7 @@
// except according to those terms.
//
// The hook directory link from the https://github.com/robotn/gohook/
// event/hook, you need to follow the relevant agreement and LICENSE.
// hook, you need to follow the relevant agreement and LICENSE.
// See the LICENSE file at the top-level directory of this distribution and at
// https://github.com/robotn/gohook/blob/master/LICENSE
@ -149,9 +149,9 @@ void dispatch_proc(iohook_event * const event) {
// fprintf(stdout, "----%s\n", buffer);
}
int add_event(char *aevent) {
int add_event(char *key_event) {
// (uint16_t *)
cevent = aevent;
cevent = key_event;
// Set the logger callback for library output.
hookSetlogger(&loggerProc);

View File

@ -9,7 +9,7 @@
// except according to those terms.
//
// The hook directory link from the https://github.com/robotn/gohook/
// event/hook, you need to follow the relevant agreement and LICENSE.
// hook, you need to follow the relevant agreement and LICENSE.
// See the LICENSE file at the top-level directory of this distribution and at
// https://github.com/robotn/gohook/blob/master/LICENSE
@ -51,9 +51,9 @@ int cstatus = 1;
int stop_event();
int add_event(char *aevent);
// int allEvent(char *aevent);
int allEvent(char *aevent, int vcode[], int size);
int add_event(char *key_event);
// int allEvent(char *key_event);
int allEvent(char *key_event, int vcode[], int size);
// NOTE: The following callback executes on the same thread that hook_run() is called
// from.

View File

@ -1198,7 +1198,7 @@ func GetImgSize(imgPath string) (int, int) {
//
// mouse arguments: mleft, mright, wheelDown, wheelUp,
// wheelLeft, wheelRight.
func AddEvent(aeve string) int {
func AddEvent(key string) int {
keycode := Map{
"f1": "59",
"f2": "60",
@ -1233,19 +1233,19 @@ func AddEvent(aeve string) int {
)
for i := 0; i < len(mArr); i++ {
if aeve == mArr[i] {
if key == mArr[i] {
mouseBool = true
}
}
if len(aeve) > 1 && !mouseBool {
keve = keycode[aeve].(string)
if len(key) > 1 && !mouseBool {
keve = keycode[key].(string)
cs = C.CString(keve)
} else {
cs = C.CString(aeve)
cs = C.CString(key)
}
// cs := C.CString(aeve)
// cs := C.CString(key)
eve := C.add_event(cs)
// fmt.Println("event@@", eve)
geve := int(eve)