From 769fd0e29602e755bc05f03d8c959f567e057749 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 6 Aug 2020 12:23:05 -0400 Subject: [PATCH] update hook code --- hook.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hook.go b/hook.go index 731f9c0..a499baf 100644 --- a/hook.go +++ b/hook.go @@ -36,6 +36,22 @@ func EventEnd() { hook.End() } +// Start start global event hook +// return event channel +func Start() chan hook.Event { + return hook.Start() +} + +// End removes global event hook +func End() { + hook.End() +} + +// StopEvent stop event listener +func StopEvent() { + hook.StopEvent() +} + // EventProcess return go hook process func EventProcess(Events chan hook.Event) chan bool { return hook.Process(Events) @@ -84,22 +100,6 @@ func AddEvent(key string) bool { return false } -// StopEvent stop event listener -func StopEvent() { - hook.StopEvent() -} - -// Start start global event hook -// return event channel -func Start() chan hook.Event { - return hook.Start() -} - -// End removes global event hook -func End() { - hook.End() -} - // AddEvents add global event hook // // robotgo.AddEvents("q")