From a945300efab8f2063b2dd1d745f8dd9808805e4e Mon Sep 17 00:00:00 2001 From: vcaesar Date: Fri, 29 May 2020 10:24:17 -0400 Subject: [PATCH] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42fc821..d6c37ad 100644 --- a/README.md +++ b/README.md @@ -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") @@ -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). \ No newline at end of file