键盘事件监控, from : https://github.com/robotn/gohook.git
Go to file
Cauê Felchar f0ddfd620c Made the library Asyncronous (#2)
* Part 1 of supporting async events

made the dispatch process send events via json through a channel (the c kind), made another function that receives it and sends it trough another channel (the go kind)

todo: remove usage of function-local data trough channel
todo:find error that is causing the c channel to fill up?

* Part 2 of making the lib async

 - New event struct mimiking C structs
 - changed c channel library to eb_chan
 - changed API to something more palatable

* General cleanup

* updated go.mod

oopsie

* Probably final touches

i swear this time

* Changed constants, keychar type and test function

now Keychar is a rune, so it can be used as a regular character.

* WIP adding better support for conversion between Scancodes and Keychars

added table, will add rest of support soon(tm)

* finished conversion table

* Satisfied stringer interface for easier debug and logging, returned old function

what the title says

* Satisfied stringer interface for easier debug and logging, returned old function

what the title says

* forgot to import unsafe
2019-02-19 10:31:25 -04:00
chan Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
event Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
hook Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
test Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
.gitignore Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
appveyor.yml update appveyor to go1.11.4 2018-12-15 13:33:18 -04:00
circle.yml rename circle ci 2018-09-16 20:25:36 -04:00
extern.go Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
go.mod Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
hook.go Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
LICENSE Initial commit 2017-01-21 16:52:05 +08:00
README.md Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00
tables.go Made the library Asyncronous (#2) 2019-02-19 10:31:25 -04:00

gohook

CircleCI Status Appveyor Go Report Card GoDoc

Based on libuiohook

package main

import (
	"fmt"
	//"github.com/robotn/gohook"
	"github.com/cauefcr/gohook"
)

func main() {
	EvChan := hook.Start()
	defer hook.End()
	for ev := range EvChan {
		fmt.Println(ev)
	}
}