diff --git a/README.md b/README.md index b40657f..8a751d5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# gohook +# ghook (gohook fork) -[![CircleCI Status](https://circleci.com/gh/cauefcr/gohook.svg?style=shield)](https://circleci.com/gh/cauefcr/gohook) -![Appveyor](https://ci.appveyor.com/api/projects/status/github/cauefcr/gohook?branch=master&svg=true) -[![Go Report Card](https://goreportcard.com/badge/github.com/cauefcr/gohook)](https://goreportcard.com/report/github.com/cauefcr/gohook) -[![GoDoc](https://godoc.org/github.com/cauefcr/gohook?status.svg)](https://godoc.org/github.com/cauefcr/gohook) +[![CircleCI Status](https://circleci.com/gh/cauefcr/ghook.svg?style=shield)](https://circleci.com/gh/cauefcr/ghook) +![Appveyor](https://ci.appveyor.com/api/projects/status/github/cauefcr/ghook?branch=master&svg=true) +[![Go Report Card](https://goreportcard.com/badge/github.com/cauefcr/ghook)](https://goreportcard.com/report/github.com/cauefcr/ghook) +[![GoDoc](https://godoc.org/github.com/cauefcr/ghook?status.svg)](https://godoc.org/github.com/cauefcr/ghook) Based on [libuiohook](https://github.com/kwhat/libuiohook) @@ -14,7 +14,7 @@ package main import ( "fmt" //"github.com/robotn/gohook" - "github.com/cauefcr/gohook" + "github.com/cauefcr/ghook" ) func main() { diff --git a/hook.go b/hook.go index 6d592f4..233f620 100644 --- a/hook.go +++ b/hook.go @@ -29,8 +29,7 @@ import ( "time" "unsafe" ) - -const ( +onst ( HookEnabled = 1 //iota HookDisabled = 2 KeyDown = 3 @@ -292,12 +291,12 @@ func End() { } // AddEvent add event listener -func AddEvent(key string) int { - cs := C.CString(key) - defer C.free(unsafe.Pointer(cs)) +// func AddEvent(key string) int { +// cs := C.CString(key) +// defer C.free(unsafe.Pointer(cs)) - eve := C.add_event(cs) - geve := int(eve) +// eve := C.add_event(cs) +// geve := int(eve) - return geve -} +// return geve +// }