Interceptor icon indicating copy to clipboard operation
Interceptor copied to clipboard

Mouse clicks doesn't work on Windows 10

Open barak1413 opened this issue 7 years ago • 5 comments

I tried to change the MouseState enum values with no success.

By the way, thanks for great project!

barak1413 avatar Nov 06 '17 17:11 barak1413

Hello Barak i see you fix the problem checking stackoverflow. https://stackoverflow.com/questions/47151718/simulate-mouse-clicks-in-kernel-space I think you make reference to mouse id InterceptionDriver.Send(context, 12

Please can explain how you do? What number should be instead 12?

Really apreciated some help

SaveTheHuman5 avatar Jan 19 '18 20:01 SaveTheHuman5

Hi,

To get the mouse id:

  1. Set both keyboard filter and mouse filter when initialising the input object.

        input = new Input();
        input.KeyboardFilterMode = KeyboardFilterMode.All;
        input.MouseFilterMode = MouseFilterMode.All;
        bool isLoad = input.Load();

  1. Add a global variable mouseId in Intercepter.Input.cs

  •       private int mouseId;
    

  1. Get the mouse id in DriverCallback function (Also in Intercepter.Input.cs)

    private void DriverCallback()
    {
    ....
    if (InterceptionDriver.IsMouse(deviceId) > 0)
            {
  •               mouseId = deviceId;
    
                  if (OnMousePressed != null)
                  {
      ....
    

  1. Change the mouse from 12 to mouseId in the following functions

SendMouseEvent

MoveMouseBy

MoveMouseTo


Remember to the bool useDriver from false to true.

liq19ch avatar Mar 15 '20 19:03 liq19ch

On my platform the correct mouse device is 11.

barak1412 avatar Mar 16 '20 07:03 barak1412

Thank you. saved my life. mine was also 11.

taejun13 avatar Apr 23 '20 18:04 taejun13

Yup, correct device is 11

For anyone not being able to send mouse clicks, try going into the Inteceptor.SendMouseEvent method

and in the line
InterceptionDriver.Send(context, 12, ref stroke, 1);

change the 12 to 11, so now the line looks like this

        InterceptionDriver.Send(context, 11, ref stroke, 1);

Jamisco avatar Nov 26 '20 07:11 Jamisco