none
UMDF Driver Question, How does umdf driver launch the system calculator? . RRS feed

  • Question

  • Hi All:

    I need your help with few questions.

    1. The virtual key sends the key code value (usagepage and usageID) to the driver. How does the driver send the key code value to the system?
    2. Does the value received by the driver need to be processed?

    For example: the system calculator key code value UsagePage:0x0c, UsageID:0192,through the SetFeature method, how does the driver send the key code value to the system and launch the calculator?

    My report descriptor is

        0x06,0x00,0x0C,               // USAGE_PAGE (Vender Defined Usage Page)
        0x0A,0x92,0x01,                      // USAGE (Vendor Usage 0x01)
        0xA1,0x01,                      // COLLECTION (Application)
        0x85,CONTROL_FEATURE_REPORT_ID,    // REPORT_ID (1)
        0x09,0x01,                         // USAGE (Vendor Usage 0x01)             //
        0x15,0x00,                         // LOGICAL_MINIMUM(0)
        0x26,0xff, 0x00,                   // LOGICAL_MAXIMUM(255)
        0x75,0x08,                         // REPORT_SIZE (0x08)
        0x96,(FEATURE_REPORT_SIZE_CB & 0xff), (FEATURE_REPORT_SIZE_CB >> 8), // REPORT_COUNT
        0xB1,0x00,                         // FEATURE (Data,Ary,Abs)
        0x09,0x01,                         // USAGE (Vendor Usage 0x01)
        0x75,0x08,                         // REPORT_SIZE (0x08)
        0x96,(INPUT_REPORT_SIZE_CB & 0xff), (INPUT_REPORT_SIZE_CB >> 8), // REPORT_COUNT
        0x81,0x00,                         // INPUT (Data,Ary,Abs)
        0x09,0x01,                         // USAGE (Vendor Usage 0x01)
        0x75,0x08,                         // REPORT_SIZE (0x08)
        0x96,(OUTPUT_REPORT_SIZE_CB & 0xff), (OUTPUT_REPORT_SIZE_CB >> 8), // REPORT_COUNT
        0x91,0x00,                         // OUTPUT (Data,Ary,Abs)
        0xC0,                        // END_COLLECTION






    Friday, March 6, 2020 8:04 AM

All replies

  • The Windows input thread posts reads to all keyboard devices. The driver doesn't know - or care - what the key code is

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Friday, March 6, 2020 9:14 PM
    Moderator
  •  UsagePage:0x0c, UsageID:0192,through the SetFeature method

    Strange, These keys should be sent via  a normal input report, not as set feature. And a standard usage exists for this, , not vendor-defined. Windows understands this usage and app key reports without any custom driver.

    -- pa

    Friday, March 6, 2020 11:02 PM
  • I want to emphasize what Pavel said, because it's a key point that you might have missed.

    If you want your HID reports to be interpreted as keystrokes, then you must use a keyboard usage page collection.  The operating system will automatically load a driver for each top-level collection in your report descriptors, but it loads the driver that is appropriate for the collection.  It loads a keyboard driver for a keyboard collection, a mouse driver for a mouse collection, and so on.  When you have a vendor-defined collection, no driver is loaded, so there is no system component translating your reports into keystrokes to be fed into applications.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, March 8, 2020 6:50 PM