mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
update hook code
This commit is contained in:
parent
27a8e625cd
commit
769fd0e296
32
hook.go
32
hook.go
@ -36,6 +36,22 @@ func EventEnd() {
|
|||||||
hook.End()
|
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
|
// EventProcess return go hook process
|
||||||
func EventProcess(Events chan hook.Event) chan bool {
|
func EventProcess(Events chan hook.Event) chan bool {
|
||||||
return hook.Process(Events)
|
return hook.Process(Events)
|
||||||
@ -84,22 +100,6 @@ func AddEvent(key string) bool {
|
|||||||
return false
|
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
|
// AddEvents add global event hook
|
||||||
//
|
//
|
||||||
// robotgo.AddEvents("q")
|
// robotgo.AddEvents("q")
|
||||||
|
Loading…
Reference in New Issue
Block a user