mirror of
https://github.com/robotn/gohook.git
synced 2024-11-24 13:26:54 +08:00
update parameter name and version
This commit is contained in:
parent
9d1ddf164b
commit
b3a746d8c4
7
hook.go
7
hook.go
@ -32,7 +32,7 @@ import (
|
||||
|
||||
const (
|
||||
// Version get the gohook version
|
||||
Version = "v0.30.2.88, Sierra Nevada!"
|
||||
Version = "v0.30.4.100, Sierra Nevada!"
|
||||
|
||||
// HookEnabled honk enable status
|
||||
HookEnabled = 1 // iota
|
||||
@ -50,6 +50,7 @@ const (
|
||||
MouseWheel = 11
|
||||
|
||||
FakeEvent = 12
|
||||
|
||||
// Keychar could be v
|
||||
CharUndefined = 0xFFFF
|
||||
WheelUp = -1
|
||||
@ -127,10 +128,10 @@ func Register(when uint8, cmds []string, cb func(Event)) {
|
||||
}
|
||||
|
||||
// Process return go hook process
|
||||
func Process(EvChan <-chan Event) (out chan bool) {
|
||||
func Process(evChan <-chan Event) (out chan bool) {
|
||||
out = make(chan bool)
|
||||
go func() {
|
||||
for ev := range EvChan {
|
||||
for ev := range evChan {
|
||||
if ev.Kind == KeyDown || ev.Kind == KeyHold {
|
||||
pressed[ev.Keycode] = true
|
||||
} else if ev.Kind == KeyUp {
|
||||
|
Loading…
Reference in New Issue
Block a user