robotn / gohook

GoHook, Go global keyboard and mouse listener hook
MIT License
314 stars 44 forks source link

A more modern, concurrent API #10

Closed cauefcr closed 4 years ago

cauefcr commented 4 years ago

Hi! You asked for a PR, and i'd like to talk about dropping backwards compatibility on some functions, they were hooking and unhooking the libuihook for every execution, and this broke the more Go-like APi I've built, which alows for multiple hooks at the same time, using little more in the C side, but a lot of functionalities that go programmers are used to, like routers for keystrokes, and in the future the same kind of API for mouse/joystick (maybe?)/MIDI (who knows) events. In the process of fixing the segfaults that were happening when you started and ended the hook too quickly i decided to delete the code for the old functions.

vcaesar commented 4 years ago

Thx, but everything is breaking, and the changed is too big, I will consider merging part of the code.

vcaesar commented 4 years ago

Merged with #12, thanks.