From bbbbefb5ff8541a05870596ea081ad8581b5879f Mon Sep 17 00:00:00 2001 From: vcaesar Date: Tue, 5 Mar 2019 15:29:54 -0400 Subject: [PATCH] add center mouse and update code style --- event/dispatch_proc.h | 3 +++ extern.go | 1 + 2 files changed, 4 insertions(+) diff --git a/event/dispatch_proc.h b/event/dispatch_proc.h index 15ef19a..be18d0d 100644 --- a/event/dispatch_proc.h +++ b/event/dispatch_proc.h @@ -181,6 +181,9 @@ void dispatch_proc_end(iohook_event * const event) { if (strcmp(cevent, "mright") == 0) { amouse = 2; } + if (strcmp(cevent, "center") == 0) { + amouse = 3; + } if (strcmp(cevent, "wheelDown") == 0) { amouse = 4; } diff --git a/extern.go b/extern.go index 6cacb4c..b1d0aff 100644 --- a/extern.go +++ b/extern.go @@ -5,6 +5,7 @@ package hook // #include "event/hook_async.h" */ import "C" + import ( "log" "time"