baykovr / AVPI

an open source voice command macro software
https://baykovr.github.io/gavpi.html
GNU General Public License v3.0
198 stars 42 forks source link

Push to talk isn't working properly #50

Closed AmethystAir closed 8 years ago

AmethystAir commented 8 years ago

I'm running the most recent release (Alpha 0.09) and no matter which key I set the push to talk to, I can't seem to get "Hold" or "PushOnce" to work. Disabling push to talk allows voice recognition to work again.

AmethystAir commented 8 years ago

I did some digging and it seems the problem is from the KeyboardHook.InstallHook() call here. I'm digging into the InputManager source to see if I can fix it.

AmethystAir commented 8 years ago

Here's the fixed DLL. The problem was with the Marshal.GetHINSTANCE call; I believe something changed with how that function works between previous .net versions and 4.0+. Anyway, simply removing that function call and replacing it with '0' in the SetWindowsHookEx fixes the keyboard and mouse hooks. InputManager.zip

AmethystAir commented 8 years ago

My bad, I just realized this was a duplicate of #29.

baykovr commented 8 years ago

Good stuff, thanks.