Jul 25, 2012 at 9:44 PM
Edited Jul 25, 2012 at 10:46 PM
I found out why and where the problem occurs, just I have no clue if my fix would have unintended consequences on the original intended uses.
In MouseHookListener.cs, there is a "private void ProcessMouseUp(ref MouseEventExtArgs e)" that is supposed to call up the MouseUp event we want. What is happening, is it completely ignores the MouseUp if the Handled flag is set to true and
only calls it if the Handled Flag is set to false.
So we need to rewrite this command a bit to allow us to get the MouseUp called when MouseDownExt set the Handled flag to true.
private void ProcessMouseUp(ref MouseEventExtArgs e)
e.Handled = true;
NOW the MouseUp will be called when the MouseDownExt sets the e.Handled flag to true or not, thus allowing for the injection of a new mouse button. Note, that it still suppresses the original mouse click for me. I'm not entirely sure why the
MouseUp wasn't allowed to always be invoked, so there might be some unintended side-effect or consequence to this until I truly can follow the code. I've been improvising and testing chaotically rather then sitting down and trying to read through the
code to understand it like I should.
(And I can finally ignore the MouseClickExt like intended plus the DoubleClick problems no longer exist!)
Again, note I do note entirely know what the side effects of such a change will be. I just know, it fixes the problem I have had for suppressing one mouse button under specific conditions while injecting a new mouse button in its place. No more
Edit: I've noticed one problem so far. The suppressed button "MouseUp" signal may still slip through, during rapid usage of the injected button. This gives you a "Sticky" button the next time you try to use the suppressed
button normally. I'm looking into how to get rid of this, and I've got one idea but I'm researching it more to make sure it doesn't have any errors before mentioning it. Again, this takes a rather rapid usage of the suppressed&injected mouse
button to trigger and I'm still trying to determine where it takes place.