Using mouse to simulate a Windows Touch device HID RRS feed

  • Question

  • My goal is as follows:

    1. Use a HID mouse, which is connected via USB, and standard MS HID driver stack is used.

    2. I would like to change mouse behavior for special purpose, so that some mouse inputs may be held, and some touch inputs may be inserted.

    How do I do it? I read the concepts of Windows UMDF and KMDF, etc. I thought two options with questions:

    A. Add a KMDF filter driver under HIDClass to convert mouse as a touch. But I don't know if the top-level descriptors and all reports can be changed.

    B. Add a virtual touch HID driver under HIDClass. Add a KMDF filter driver under HIDClass. When receiving mouse inputs, simulate the inputs in virtual touch HID.

    Is there any sample template that I can use to start with?


    Howard You

    Wednesday, March 13, 2013 3:36 AM


All replies

  • you don't need a driver at all. you can use a low level mouse hook or WM_INPUT to capture mouse movement and then call InjectTouchInput, , to simulate touch.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, March 13, 2013 5:10 AM
  • I thought about the case again. InjectTouchInput only works with Windows 8 desktop apps or Server 2012 desktop apps. And there are quite a few message groups, such as WM_MOUSE messages, WM_MOUSE_LL, WM_INPUT, WM_GESTURE, WM_TOUCH, etc. Many apps pick different messages. Windows 8 and Server 2012 introduce a very different way, such as WM_POINTER.

    I am still quite confused.

    Thursday, March 14, 2013 4:52 PM