Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed May 29, 2020
1 parent 0fa5a96 commit a945300
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import (
)

func main() {
add()

low()
}

func add() {
fmt.Println("--- Please press ctrl + shift + q to stop hook ---")
hook.Register(hook.KeyDown, []string{"q", "ctrl", "shift"}, func(e hook.Event) {
fmt.Println("ctrl-shift-q")
Expand All @@ -30,14 +36,17 @@ func main() {

s := hook.Start()
<-hook.Process(s)
}

func low() {
EvChan := hook.Start()
defer hook.End()

for ev := range EvChan {
fmt.Println("hook: ", ev)
}
}

```

Based on [libuiohook](https://github.com/kwhat/libuiohook).

0 comments on commit a945300

Please sign in to comment.