oblitum / Interception

The Interception API aims to build a portable programming interface that allows one to intercept and control a range of input devices.
http://oblita.com/interception
1.37k stars 267 forks source link

Misses quick actions #76

Closed cajhin closed 5 years ago

cajhin commented 5 years ago

Running the "identify" sample broke my mouse+keyboard in funky ways. The reason was that I mouse-click too fast. While Interception processes mouse_down, it misses mouse_up (and probably is overtaken by it). Then Interception sends mouse_down, and the left mouse button is permanently down (as far as Windows is concerned). Clicking sloowly fixes this.

I assume I will have similar problems when I use a programmable keyboard which sends macros.

Is there a way to pause the kernel driver while Interception is busy? This might avoid all kinds of nasty race conditions...

Otherwise, thanks a lot for the tool, This might be just what I need to put my Autohotkey keyboard rules on a lower OS level.

oblitum commented 5 years ago

The example specifically only captures mouse down event. It's just for demonstration. There may be issues if you click in the console window, because windows behaves by pausing the program when you do some events in the console window, and if some program using interception is paused, then your devices will be too. It's built to try identification while clicking and typing outside of the console window, using it just for watching the messages.

cajhin commented 5 years ago

Thanks. The issue actually happens when I click anywhere (not just over the console). But if the issue is confined to the demo, I'm ready to roll with Interception. (I have a first key remapper running, struggeling with WIN being invisible - keyboards are messy)

oblitum commented 5 years ago

OK, I'll close the issue. Notice that in all samples the process elevates its privilege so to not hang/slow input.