mirror of
https://github.com/robotn/gohook.git
synced 2024-12-04 20:06:42 +08:00
29 lines
883 B
Markdown
29 lines
883 B
Markdown
# gohook
|
|
|
|
[![Build Status](https://github.com/robotn/gohook/workflows/Go/badge.svg)](https://github.com/robotn/gohook/commits/master)
|
|
[![CircleCI Status](https://circleci.com/gh/robotn/gohook.svg?style=shield)](https://circleci.com/gh/robotn/gohook)
|
|
![Appveyor](https://ci.appveyor.com/api/projects/status/github/robotn/gohook?branch=master&svg=true)
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/robotn/gohook)](https://goreportcard.com/report/github.com/robotn/gohook)
|
|
[![GoDoc](https://godoc.org/github.com/robotn/gohook?status.svg)](https://godoc.org/github.com/robotn/gohook)
|
|
<!-- This is a work in progress. -->
|
|
|
|
```Go
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/robotn/gohook"
|
|
)
|
|
|
|
func main() {
|
|
EvChan := hook.Start()
|
|
defer hook.End()
|
|
|
|
for ev := range EvChan {
|
|
fmt.Println("hook: ", ev)
|
|
}
|
|
}
|
|
```
|
|
|
|
Based on [libuiohook](https://github.com/kwhat/libuiohook). |