Closed AmethystAir closed 8 years ago
I've renamed "PressOnce" to "Toggle" to more accurately represent what it does, as well as added a "Single" mode which recognizes one voice command after the key is pressed then stops.
Thanks for the fix,
Verified InputManager, diff:
InstallHook()
- KeyboardHook.KeyHook = KeyboardHook.SetWindowsHookEx(13, KeyboardHook.KeyHookDelegate, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]).ToInt32(), 0);
+ KeyboardHook.KeyHook = KeyboardHook.SetWindowsHookEx(13, KeyboardHook.KeyHookDelegate, 0, 0);
Debug hooks got baked in, don't think they will cause any problems...
Which tool did you use? Need to apply the same change to MouseHook.cs
InputManager.MouseHook.MouseHook = InputManager.MouseHook.SetWindowsHookEx(14, InputManager.MouseHook.MouseHookDelegate, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]).ToInt32(), 0);
I just downloaded the source from the InputManager site and used Visual Studio to fix it. If I remember, the one I committed included the fixed mouse hooks (I noticed it after double checking the code) but not the one I zipped and uploaded. If it isn't fixed in the one I committed I can re-upload without debug hooks.
I patched InputManager to work with .NET 4.0; There shouldn't be any more OverflowExceptions thrown from InstallHook() calls.