robotn / gohook

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

Consume Events? #16

Open jonatino opened 4 years ago

jonatino commented 4 years ago

Is there any way to consume events to prevent farther propagation to windows (disabling alt+tab, windows key for example)?

cauefcr commented 4 years ago

Well, we need to explore libuiohook for this method.

rajatkb commented 3 years ago

In libuihook it is possible by setting 0x1 in a reserved variable memory location in the event struct that is returned. But that is in C runtime. Any way we can achieve same in Go runtime. I saw the code looks like go hook is creating its own copy of that struct. Anyway we can have this 0x1 copied to C environment from Go when running ?

Libuihook event porpoagation block : Block event issue link libuihook

igorcafe commented 2 years ago

This tool does something similar... May be useful https://gitlab.fi.muni.cz/unix/noctrl