diff --git a/go.mod b/go.mod index 3fc0e58..b880f80 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-ole/go-ole v1.2.2 // indirect github.com/lxn/win v0.0.0-20181015143721-a7f87360b10e github.com/otiai10/gosseract v2.2.0+incompatible - github.com/robotn/gohook v0.0.0-20190221131031-8d5c93253274 + github.com/robotn/gohook v0.0.0-20190227135941-4e658a44067c github.com/shirou/gopsutil v2.18.12+incompatible github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa diff --git a/go.sum b/go.sum index b6f9e11..ed8cf86 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/lxn/win v0.0.0-20181015143721-a7f87360b10e h1:dz4TzIsrPe4XtUyhLkOLdCS github.com/lxn/win v0.0.0-20181015143721-a7f87360b10e/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE= github.com/otiai10/gosseract v2.2.0+incompatible h1:r2Icyba/doznLy0MgsDMWJADETgJNjlX78x/BBbhCUY= github.com/otiai10/gosseract v2.2.0+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE= -github.com/robotn/gohook v0.0.0-20190221131031-8d5c93253274 h1:kSg34ruV/HqMFgzSkmsUPaDwm8pCpVZXf9j8VY0gNY0= -github.com/robotn/gohook v0.0.0-20190221131031-8d5c93253274/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4= +github.com/robotn/gohook v0.0.0-20190227135941-4e658a44067c h1:lhKBCH1mWQcvD2eVZevWlXYBJ2npFArzFVAFj3p6z58= +github.com/robotn/gohook v0.0.0-20190227135941-4e658a44067c/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4= github.com/shirou/gopsutil v2.18.12+incompatible h1:1eaJvGomDnH74/5cF4CTmTbLHAriGFsTZppLXDX93OM= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U= diff --git a/vendor/github.com/robotn/gohook/event/dispatch_proc.h b/vendor/github.com/robotn/gohook/event/dispatch_proc.h index fddf9c0..15ef19a 100644 --- a/vendor/github.com/robotn/gohook/event/dispatch_proc.h +++ b/vendor/github.com/robotn/gohook/event/dispatch_proc.h @@ -31,7 +31,7 @@ void dispatch_proc(iohook_event * const event) { case EVENT_KEY_RELEASED: case EVENT_KEY_TYPED: sprintf(buffer, - "{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"keycode\":%hu,\"rawcode\":%hu,\"keychar\":%hu}", + "{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"keycode\":%hu,\"rawcode\":%hu,\"keychar\":%d}", event->type, event->time, event->mask,event->reserved, event->data.keyboard.keycode, event->data.keyboard.rawcode, @@ -52,7 +52,7 @@ void dispatch_proc(iohook_event * const event) { break; case EVENT_MOUSE_WHEEL: sprintf(buffer, - "{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"clicks\":%hu,\"x\":%hd,\"y\":%hd,\"type\":%hu,\"ammount\":%hu,\"rotation\":%hd,\"direction\":%hu}", + "{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"clicks\":%hu,\"x\":%hd,\"y\":%hd,\"type\":%d,\"ammount\":%hu,\"rotation\":%d,\"direction\":%d}", event->type, event->time, event->mask, event->reserved, event->data.wheel.clicks, event->data.wheel.x, diff --git a/vendor/github.com/robotn/gohook/hook.go b/vendor/github.com/robotn/gohook/hook.go index 86316ba..00927b4 100644 --- a/vendor/github.com/robotn/gohook/hook.go +++ b/vendor/github.com/robotn/gohook/hook.go @@ -76,7 +76,7 @@ type Event struct { Y int16 `json:"y"` Amount uint16 `json:"amount"` - Rotation int16 `json:"rotation"` + Rotation int32 `json:"rotation"` Direction uint8 `json:"direction"` } diff --git a/vendor/github.com/robotn/gohook/hook/iohook.h b/vendor/github.com/robotn/gohook/hook/iohook.h index e135ba6..6fd3471 100644 --- a/vendor/github.com/robotn/gohook/hook/iohook.h +++ b/vendor/github.com/robotn/gohook/hook/iohook.h @@ -103,7 +103,8 @@ typedef struct _mouse_wheel_event_data { int16_t y; uint8_t type; uint16_t amount; - int16_t rotation; + int32_t rotation; + // int16_t rotation; uint8_t direction; } mouse_wheel_event_data; diff --git a/vendor/modules.txt b/vendor/modules.txt index aa123b8..5eb104e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -17,7 +17,7 @@ github.com/go-ole/go-ole/oleutil github.com/lxn/win # github.com/otiai10/gosseract v2.2.0+incompatible github.com/otiai10/gosseract -# github.com/robotn/gohook v0.0.0-20190221131031-8d5c93253274 +# github.com/robotn/gohook v0.0.0-20190227135941-4e658a44067c github.com/robotn/gohook # github.com/shirou/gopsutil v2.18.12+incompatible github.com/shirou/gopsutil/process