From 0fa5a96dfe00a4c4288be9524a1ef07fbcfbc603 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 28 May 2020 10:31:52 -0400 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index fc70f92..42fc821 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,20 @@ import ( ) func main() { + 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") + hook.End() + }) + + fmt.Println("--- Please press w---") + hook.Register(hook.KeyDown, []string{"w"}, func(e hook.Event) { + fmt.Println("w") + }) + + s := hook.Start() + <-hook.Process(s) + EvChan := hook.Start() defer hook.End()