Targus Input Devices Driver



-->Driver

Important

  • Driver and Software Downloads. Find and download drivers, software, and user guides for Targus products including docking stations, USB hubs, video adapters, and tablet cases. For Technical News and Updates: Vist our Tech Talk Blog. For Assistance: Visit our Support Page. Note: For the best experience access this page from a desktop or laptop.
  • Go to Device Manager (right click on My Computer, choose Manage and then find Device Manager in the left panel), or right click on Start Menu for Windows 10 and select Device Manager.

This topic is for programmers. If you are a customer experiencing USB problems, see Troubleshoot common USB problems

Targus input devices driver updater

This topic lists the Microsoft-provided drivers for the supported USB device classes.

  • Microsoft-provided drivers for USB-IF approved device classes.
  • For composite devices, use USB Generic Parent Driver (Usbccgp.sys) that creates physical device objects (PDOs) for each function.
  • For non-composite devices or a function of a composite device, use WinUSB (Winusb.sys).

If you are installing USB drivers: You do not need to download USB device class drivers. They are installed automatically. These drivers and their installation files are included in Windows. They are available in the WindowsSystem32DriverStoreFileRepository folder. The drivers are updated through Windows Update.

Jul 04, 2008 Just right click My Computer- Device Manager - HID-devices - Unknown Device and search for drivers. Vista will not find any drivers online, so you have to search for drivers on your own computer. The location of this driver (in most cases) will be C:/Windows/Winsxs. You will get a popup saying 'this is an unsigned driver bla bla bla'.

If you are writing a custom driver: Before writing a driver for your USB device, determine whether a Microsoft-provided driver meets the device requirements. If a Microsoft-provided driver is not available for the USB device class to which your device belongs, then consider using generic drivers, Winusb.sys or Usbccgp.sys. Write a driver only when necessary. More guidelines are included in Choosing a driver model for developing a USB client driver.

USB Device classes

USB Device classes are categories of devices with similar characteristics and that perform common functions. Those classes and their specifications are defined by the USB-IF. Each device class is identified by USB-IF approved class, subclass, and protocol codes, all of which are provided by the IHV in device descriptors in the firmware. Microsoft provides in-box drivers for several of those device classes, called USB device class drivers. If a device that belongs to a supported device class is connected to a system, Windows automatically loads the class driver, and the device functions with no additional driver required.

Hardware vendors should not write drivers for the supported device classes. Windows class drivers might not support all of the features that are described in a class specification. If some of the device's capabilities are not implemented by the class driver, vendors should provide supplementary drivers that work in conjunction with the class driver to support the entire range of functionality provided by the device.

Technisat

For general information about USB-IF approved device classes see the USB Common Class Specification

The current list of USB class specifications and class codes is documented in the USB-IF Defined Class Code List.

Device setup classes

Windows categorizes devices by device setup classes, which indicate the functionality of the device.

Microsoft defines setup classes for most devices. IHVs and OEMs can define new device setup classes, but only if none of the existing classes apply. For more information, see System-Defined Device Setup Classes.

Two important device setup classes for USB devices are as follows:

  • USBDevice {88BAE032-5A81-49f0-BC3D-A4FF138216D6}: IHVs must use this class for custom devices that do not belong to another class. This class is not used for USB host controllers and hubs.

  • USB {36fc9e60-c465-11cf-8056-444553540000}: IHVs must not use this class for their custom devices. This is reserved for USB host controllers and USB hubs.

The device setup classes are different from USB device classes discussed earlier. For example, an audio device has a USB device class code of 01h in its descriptor. When connected to a system, Windows loads the Microsoft-provided class driver, Usbaudio.sys. In Device Manager, the device is shown under is Sound, video and game controllers, which indicates that the device setup class is Media.

Microsoft-provided USB device class drivers

USB-IF class codeDevice setup classMicrosoft-provided driver and INFWindows supportDescription
Audio (01h)Media
{4d36e96c-e325-11ce-bfc1-08002be10318}
Usbaudio.sys

Wdma_usb.inf

Windows 10 for desktop editions (Home, Pro, Enterprise, and Education)
Windows 10 Mobile
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides support for the USB audio device class by means of the Usbaudio.sys driver. For more information, see 'USBAudio Class System Driver' in Kernel-Mode WDM Audio Components. For more information about Windows audio support, see the Audio Device Technologies for Windows website.
Communications and CDC Control (02h)
Ports
{4D36E978-E325-11CE-BFC1-08002BE10318}
Usbser.sys
Usbser.inf
Windows 10 for desktop editions
Windows 10 Mobile
In Windows 10, a new INF, Usbser.inf, has been added that loads Usbser.sys automatically as the function driver.

For more information, see USB serial driver (Usbser.sys)

Modem
{4D36E96D-E325-11CE-BFC1-08002BE10318}

Note Supports Subclass 02h (ACM)

Usbser.sys
Custom INF that references mdmcpq.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
In Windows 8.1 and earlier versions, Usbser.sys is not automatically loaded. To load the driver, you need to write an INF that references the modem INF (mdmcpq.inf) and includes [Install] and [Needs] sections.

Starting with Windows Vista, you can enable CDC and Wireless Mobile CDC (WMCDC) support by setting a registry value, as described in Support for the Wireless Mobile Communication Device Class.

When CDC support is enabled, the USB Common Class Generic Parent Driver enumerates interface collections that correspond to CDC and WMCDC Control Models, and assigns physical device objects (PDO) to these collections.

Net
{4d36e972-e325-11ce-bfc1-08002be10318}
Note Supports Subclass 0Eh (MBIM)
wmbclass.sys
Netwmbclass.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Starting in Windows 8, Microsoft provides the wmbclass.sys driver, for mobile broadband devices. See, MB Interface Model.
HID (Human Interface Device) (03h)HIDClass
{745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Hidclass.sys
Hidusb.sys
Input.inf
Windows 10 for desktop editions
Windows 10 Mobile
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the HID class driver (Hidclass.sys) and the miniclass driver (Hidusb.sys) to operate devices that comply with the USB HID Standard. For more information, see HID Architecture and Minidrivers and the HID class driver. For further information about Windows support for input hardware, see the Input and HID - Architecture and Driver Support website.
Physical (05h)---Recommended driver: WinUSB (Winusb.sys)
Image (06h)Image
{6bdd1fc6-810f-11d0-bec7-08002be2092f}
Usbscan.sys
Sti.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the Usbscan.sys driver that manages USB digital cameras and scanners for Windows XP and later operating systems. This driver implements the USB component of the Windows Imaging Architecture (WIA). For more information about WIA, see Windows Image Acquisition Drivers and the Windows Imaging Component website. For a description of the role that Usbscan.sys plays in the WIA, see WIA Core Components.
Printer (07h)USB

Note Usbprint.sys enumerates printer devices under the device set up class: Printer

{4d36e979-e325-11ce-bfc1-08002be10318}.

Usbprint.sys
Usbprint.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the Usbprint.sys class driver that manages USB printers. For information about implementation of the printer class in Windows, see the Printing - Architecture and Driver Support website.
Mass Storage (08h)
USBUsbstor.sysWindows 10 for desktop editions
Windows 10 Mobile
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the Usbstor.sys port driver to manage USB mass storage devices with Microsoft's native storage class drivers. For an example device stack that is managed by this driver, see Device Object Example for a USB Mass Storage Device. For information about Windows storage support, see the Storage Technologies website.
SCSIAdapter

{4d36e97b-e325-11ce-bfc1-08002be10318}

SubClass (06) and Protocol (62)
Uaspstor.sys
Uaspstor.inf
Windows 10 for desktop editions
Windows 10 Mobile
Windows 8.1
Windows 8
Uaspstor.sys is the class driver for SuperSpeed USB devices that support bulk stream endpoints. For more information see:
Hub (09h)USB

{36fc9e60-c465-11cf-8056-444553540000}

Usbhub.sys
Usb.inf
Windows 10 for desktop editions
Windows 10 Mobile
Windows 8.1
Windows 8
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the Usbhub.sys driver for managing USB hubs. For more information about the relationship between the hub class driver and the USB stack, see USB host-side drivers in Windows.
Usbhub3.sys
Usbhub3.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Microsoft provides the Usbhub3.sys driver for managing SuperSpeed (USB 3.0) USB hubs.

The driver is loaded when a SuperSpeed hub is attached to an xHCI controller. See USB host-side drivers in Windows.

CDC-Data (0Ah)---Recommended driver: WinUSB (Winusb.sys)
Smart Card (0Bh)SmartCardReader

{50dd5230-ba8a-11d1-bf5d-0000f805f530}

Usbccid.sys (Obsolete)Windows 10 for desktop editions
Windows 7
Windows Server 2008
Windows Vista
Microsoft provides the Usbccid.sys mini-class driver to manage USB smart card readers. For more information about smart card drivers in Windows, see Smart Card Design Guide.

Note that for Windows Server 2003, Windows XP, and Windows 2000, special instructions are required for loading this driver because it might have been released later than the operating system.

Driver

Note Usbccid.sys driver has been replaced by UMDF driver, WUDFUsbccidDriver.dll.

WUDFUsbccidDriver.dll
WUDFUsbccidDriver.inf
Windows 8.1
Windows 8
WUDFUsbccidDriver.dll is a user-mode driver for USB CCID Smart Card Reader devices.
Content Security (0Dh)---Recommended driver: USB Generic Parent Driver (Usbccgp.sys). Some content security functionality is implemented in Usbccgp.sys. See Content Security Features in Usbccgp.sys.
Video (0Eh)Image
{6bdd1fc6-810f-11d0-bec7-08002be2092f}
Usbvideo.sys

Usbvideo.inf

Windows 10 for desktop editions

Windows Vista

Microsoft provides USB video class support by means of the Usbvideo.sys driver. For more information, see 'USB Video Class Driver' under AVStream Minidrivers.

Note that for Windows XP, special instructions are required for loading this driver because it might have been released later than the operating system.

Personal Healthcare (0Fh)---Recommended driver: WinUSB (Winusb.sys)
Audio/Video Devices (10h)----
Diagnostic Device (DCh)---Recommended driver: WinUSB (Winusb.sys)
Wireless Controller (E0h)

Note Supports Subclass 01h and Protocol 01h

Bluetooth

{e0cbf06c-cd8b-4647-bb8a-263b43f0f974}

Bthusb.sys

Bth.inf

Windows 10 for desktop editions
Windows 10 Mobile
Windows 8.1
Windows 8
Windows 7
Windows Vista
Microsoft provides the Bthusb.sys miniport driver to manage USB Bluetooth radios. For more information, see Bluetooth Design Guide.
Miscellaneous (EFh)Net

{4d36e972-e325-11ce-bfc1-08002be10318}

Note Supports SubClass 04h and Protocol 01h

Rndismp.sys
Rndismp.inf
Windows 10 for desktop editions
Windows 8.1
Windows 8
Windows 7
Windows Vista
Prior to Windows Vista, support for CDC is limited to the RNDIS-specific implementation of the Abstract Control Model (ACM) with a vendor-unique protocol (bInterfaceProtocol) value of 0xFF. The RNDIS facility centers the management of all 802-style network cards in a single class driver, Rndismp.sys. For a detailed discussion of remote NDIS, see Overview of Remote NDIS. The mapping of remote NDIS to USB is implemented in the Usb8023.sys driver. For further information about networking support in Windows, see the Networking and Wireless Technologies website.
Application Specific (FEh)---Recommended driver: WinUSB (Winusb.sys)
Vendor Specific (FFh)--Windows 10 for desktop editions
Windows 10 Mobile
Recommended driver: WinUSB (Winusb.sys)

Related topics

-->

Note

This topic is for developers who are creating drivers for keyboard and mouse HID clients. If you are looking to fix a mouse or keyboard, see:

This topic discusses keyboard and mouse HID client drivers. Keyboards and mice represent the first set of HID clients that were standardized in the HID Usage tables and implemented in Windows operating systems.

Keyboard and mouse HID client drivers are implemented in the form of HID Mapper Drivers. A HID mapper driver is a kernel-mode WDM filter driver that provides a bidirectional interface for I/O requests between a non-HID Class driver and the HID class driver. The mapper driver maps the I/O requests and data protocols of one to the other.

Windows provides system-supplied HID mapper drivers for HID keyboard, and HID mice devices.

Architecture and overview

The following figure illustrates the system-supplied driver stacks for USB keyboard and mouse/touchpad devices.

The figure above includes the following components:

  • KBDHID.sys – HID client mapper driver for keyboards. Converts HID usages into scancodes to interface with the existing keyboard class driver.
  • MOUHID.sys – HID client mapper driver for mice/touchpads. Converts HID usages into mouse commands (X/Y, buttons, wheel) to interface with the existing keyboard class driver.
  • KBDCLASS.sys – The keyboard class driver maintains functionality for all keyboards and keypads on the system in a secure manner.
  • MOUCLASS.sys – The mouse class driver maintains functionality for all mice / touchpads on the system. The driver does support both absolute and relative pointing devices. This is not the driver for touchscreens as that is managed by a different driver in Windows.
  • HIDCLASS.sys - The HID class driver. The HID Class driver is the glue between KBDHID.sys and MOUHID.sys HID clients and various transports (USB, Bluetooth, etc).

The system builds the driver stack as follows:

  • The transport stack creates a physical device object (PDO) for each HID device attached and loads the appropriate HID transport driver which in turn loads the HID Class Driver.
  • The HID class driver creates a PDO for each keyboard or mouse TLC. Complex HID devices (more than 1 TLC) are exposed as multiple PDOs created by HID class driver. For example, a keyboard with an integrated mouse might have one collection for the standard keyboard controls and a different collection for the mouse.
  • The keyboard or mouse hid client mapper drivers are loaded on the appropriate FDO.
  • The HID mapper drivers create FDOs for keyboard and mouse, and load the class drivers.

Important notes:

  • Vendor drivers are not required for keyboards and mice that are compliant with the supported HID Usages and top level collections.
  • Vendors may optionally provide filter drivers in the HID stack to alter/enhance the functionality of these specific TLC.
  • Vendors should create separate TLCs, that are vendor specific, to exchange vendor proprietary data between their hid client and the device. Avoid using filter drivers unless critical.
  • The system opens all keyboard and mouse collections for its exclusive use.
  • The system prevents disable/enabling a keyboard.
  • The system provides support for horizontal/vertical wheels with smooth scrolling capabilities.

Driver Guidance

Microsoft provides the following guidance for IHVs writing drivers:

  1. Driver developers are allowed to add additional drivers in the form of a filter driver or a new HID Client driver. The criteria are described below:

    1. Filters Drivers: Driver developers should ensure that their value-add driver is a filter driver and does not replace (or be used in place of) existing Windows HID drivers in the input stack.

      • Filter drivers are allowed in the following scenarios:
        • As an upper filter to kbdhid/mouhid
        • As an upper filter to kbdclass/mouclass
      • Filter drivers are not recommended as a filter between HIDCLASS and HID Transport minidriver
    2. Function Drivers: Alternatively vendors can create a function driver (instead of a filter driver) but only for vendor specific HID PDOs (with a user mode service if necessary).

      Function drivers are allowed in the following scenarios:

      • Only load on the specific vendor’s hardware
    3. Transport Drivers: Windows team does not recommend creating additional HID Transport minidriver as they are complex drivers to write/maintain. If a partner is creating a new HID Transport minidriver, especially on SoC systems, we recommend a detailed architectural review to understand the reasoning and ensure that the driver is developed correctly.

  2. Driver developers should leverage driver Frameworks (KMDF or UMDF) and not rely on WDM for their filter drivers.

  3. Driver developers should reduce the number of kernel-user transitions between their service and the driver stack.

  4. Driver developers should ensure ability to wake the system via both keyboard and touchpad functionality (adjustable by the end user (device manager) or the PC manufacturer). In addition on SoC systems, these devices must be able to wake themselves from a lower powered state while the system is in a working S0 state.

  5. Driver developers should ensure that their hardware is power managed efficiently.

    • Device can go into its lowest power state when the device is idle.
    • Device is in the lowest power state when the system is in a low power state (for example, standby (S3) or connected standby).

Keyboard layout

A keyboard layout fully describes a keyboard's input characteristics for Microsoft Windows 2000 and later versions. For example, a keyboard layout specifies the language, keyboard type and version, modifiers, scan codes, and so on.

See the following for information about keyboard layouts:

  • Keyboard header file, kdb.h, in the Windows Driver Development Kit (DDK), which documents general information about keyboard layouts.

  • Sample keyboard layouts.

To visualize the layout of a specific keyboard, see Windows Keyboard Layouts.

For additional details around the keyboard layout, visit Control PanelClock, Language, and RegionLanguage.

Supported buttons and wheels on mice

The following table identifies the features supported across different client versions of the Windows operating system. Download driver touch screen hp pavilion x360.

FeatureWindows XPWindows VistaWindows 7Windows 8 and later
Buttons 1-5Supported (P/2 & HID)Supported (PS/2 & HID)Supported (PS/2 & HID)Supported (PS/2 & HID)
Vertical Scroll WheelSupported (PS/2 & HID)Supported (PS/2 & HID)Supported (PS/2 & HID)Supported (PS/2 & HID)
Horizontal Scroll WheelNot SupportedSupported(HID only)Supported(HID only)Supported(HID only)
Smooth Scroll Wheel Support (Horizontal and Vertical)Not SupportedPartly SupportedSupported (HID only)Supported (HID only)

Activating buttons 4-5 and wheel on PS/2 mice

Output devices of computer

The method used by Windows to activate the new 4&5-button + wheel mode is an extension of the method used to activate the third button and the wheel in IntelliMouse-compatible mice:

  • First, the mouse is set to the 3-button wheel mode, which is accomplished by setting the report rate consecutively to 200 reports/second, then to 100 reports/second, then to 80 reports/second, and then reading the ID from the mouse. The mouse should report an ID of 3 when this sequence is completed.
  • Next, the mouse is set to the 5-button wheel mode, which is accomplished by setting the report rate consecutively to 200 reports/second, then to 200 reports/second again, then to 80 reports/second, and then reading the ID from the mouse. Once this sequence is completed, a 5-button wheel mouse should report an ID of 4 (whereas an IntelliMouse-compatible 3-button wheel mouse would still report an ID of 3).

Note that this is applicable to PS/2 mice only and is not applicable to HID mice (HID mice must report accurate usages in their report descriptor).

Standard PS/2-compatible mouse data packet format (2 Buttons)

ByteD7D6D5D4D3D2D1D0Comment
1YoverXoverYsignXsignTagMRLX/Y overvlows and signs, buttons
2X7X6X5X4X3X2X1X0X data byte
3Y7Y6Y5Y4Y3Y2Y1Y0Y data bytes

Note

Windows mouse drivers do not check the overflow bits. In case of overflow, the mouse should simply send the maximal signed displacement value.

Standard PS/2-compatible mouse data packet format (3 Buttons + VerticalWheel)

ByteD7D6D5D4D3D2D1D0Comment
100YsignXsign1MRLX/Y signs and R/L/M buttons
2X7X6X5X4X3X2X1X0X data byte
3Y7Y6Y5Y4Y3Y2Y1Y0Y data bytes
4Z7Z6Z5Z4Z3Z2Z1Z0Z/wheel data byte

Standard PS/2-compatible mouse data packet format (5 Buttons + VerticalWheel)

ByteD7D6D5D4D3D2D1D0Comment
100YsignXsign1MRLX/Y signs and R/L/M buttons
2X7X6X5X4X3X2X1X0X data byte
3Y7Y6Y5Y4Y3Y2Y1Y0Y data bytes
400B5B4Z3Z2Z1Z0Z/wheel data and buttons 4 and 5

Important

Notice that the Z/wheel data for a 5-button wheel mouse has been reduced to four bits instead of the 8 bits used in the IntelliMouse-compatible 3-button wheel mode. This reduction is made possible by the fact that the wheel typically cannot generate values beyond the range +7/-8 during any given interrupt period. Windows mouse drivers will sign extend the four Z/wheel data bits when the mouse is in the 5-button wheel mode, and the full Z/wheel data byte when the mouse operates in the 3-button wheel mode.

Buttons 4 & 5 on are mapped to WM_APPCOMMAND messages and correspond to App_Back and App_Forward.

Devices not requiring vendor drivers

Vendor drivers are not required for the following devices:

  • Devices that comply with the HID Standard.
  • Keyboard, mouse, or game port devices operated by the system-supplied non-HIDClass drivers.

Kbfiltr sample

Kbfiltr is designed to be used with Kbdclass, the system class driver for keyboard devices and I8042prt, the function driver for a PS/2-style keyboard. Kbfiltr demonstrates how to filter I/O requests and how to add callback routines that modify the operation of Kbdclass and I8042prt.

For more information about Kbfiltr operation, see the following:

  • The ntddkbd.h WDK header file.

  • The sample Kbfiltr source code.

Kbfiltr IOCTLs

IOCTL_INTERNAL_I8042_HOOK_KEYBOARD

Targus Input Devices Driver

The IOCTL_INTERNAL_I8042_HOOK_KEYBOARD request does the following:

  • Adds an initialization callback routine to the I8042prt keyboard initialization routine.
  • Adds an ISR callback routine to the I8042prt keyboard ISR.

The initialization and ISR callbacks are optional and are provided by an upper-level filter driver for a PS/2-style keyboard device.

After I8042prt receives an IOCTL_INTERNAL_KEYBOARD_CONNECT request, it sends a synchronous IOCTL_INTERNAL_I8042_HOOK_KEYBOARD request to the top of the keyboard device stack.

After Kbfiltr receives the hook keyboard request, Kbfiltr filters the request in the following way:

  • Saves the upper-level information passed to Kbfiltr, which includes the context of an upper-level device object, a pointer to an initialization callback, and a pointer to an ISR callback.
  • Replaces the upper-level information with its own.
  • Saves the context of I8042prt and pointers to callbacks that the Kbfiltr ISR callback can use.

IOCTL_INTERNAL_KEYBOARD_CONNECT

The IOCTL_INTERNAL_KEYBOARD_CONNECT request connects the Kbdclass service to the keyboard device. Kbdclass sends this request down the keyboard device stack before it opens the keyboard device.

After Kbfiltr received the keyboard connect request, Kbfiltr filters the connect request in the following way:

  • Saves a copy of Kbdclass's CONNECT_DATA (Kbdclass) structure that is passed to the filter driver by Kbdclass.
  • Substitutes its own connect information for the class driver connect information.
  • Sends the IOCTL_INTERNAL_KEYBOARD_CONNECT request down the device stack.

If the request is not successful, Kbfiltr completes the request with an appropriate error status.

Kbfiltr provides a template for a filter service callback routine that can supplement the operation of KeyboardClassServiceCallback, the Kbdclass class service callback routine. The filter service callback can filter the input data that is transferred from the device input buffer to the class data queue.

IOCTL_INTERNAL_KEYBOARD_DISCONNECT

The IOCTL_INTERNAL_KEYBOARD_DISCONNECT request is completed with a status of STATUS_NOT_IMPLEMENTED. Note that a Plug and Play keyboard can be added or removed by the Plug and Play manager.

For all other device control requests, Kbfiltr skips the current IRP stack and sends the request down the device stack without further processing.

Callback routines implemented by Kbfiltr

KbFilter_InitializationRoutine

See PI8042_KEYBOARD_INITIALIZATION_ROUTINE

The KbFilter_InitializationRoutine is not needed if the I8042prt default initialization of a keyboard is sufficient.

I8042prt calls KbFilter_InitializationRoutine when it initializes the keyboard. Default keyboard initialization includes the following operations:

  • reset the keyboard
  • set the typematic rate and delay
  • set the light-emitting diodes (LED)

KbFilter_IsrHook

See PI8042_KEYBOARD_ISR. This callback is not needed if the default operation of I8042prt is sufficient.

The I8042prt keyboard ISR calls KbFilter_IsrHook after it validates the interrupt and reads the scan code.

KbFilter_IsrHook runs in kernel mode at the IRQL of the I8042prt keyboard.

KbFilter_ServiceCallback

See PSERVICE_CALLBACK_ROUTINE.

The ISR dispatch completion routine of the function driver calls KbFilter_ServiceCallback, which then calls the keyboard class driver's implementation of PSERVICE_CALLBACK_ROUTINE. A vendor can implement a filter service callback to modify the input data that is transferred from the device's input buffer to the class data queue. For example, the callback can delete, transform, or insert data.

Moufiltr sample

Moufiltr is designed to be used with Mouclass, the system class driver for mouse devices used with Windows 2000 and later versions, and I8042prt, the function driver for a PS/2-style mouse used with Windows 2000 and later. Moufiltr demonstrates how to filter I/O requests and add callback routines that modify the operation of Mouclass and I8042prt.

For more information about Moufiltr operation, see the following:

  • The ntddmou.h WDK header file.

  • The sample Moufiltr source code.

Moufiltr control codes

IOCTL_INTERNAL_I8042_HOOK_MOUSE

The IOCTL_INTERNAL_I8042_HOOK_MOUSE request adds an ISR callback routine to the I8042prt mouse ISR. The ISR callback is optional and is provided by an upper-level mouse filter driver.

I8042prt sends this request after it receives an IOCTL_INTERNAL_MOUSE_CONNECT request. I8042prt sends a synchronous IOCTL_INTERNAL_I8042_HOOK_MOUSE request to the top of the mouse device stack.

After Moufiltr receives the hook mouse request, it filters the request in the following way:

Output devices of computer
  • Saves the upper-level information passed to Moufiltr, which includes the context of an upper-level device object and a pointer to an ISR callback.
  • Replaces the upper-level information with its own.
  • Saves the context of I8042prt and pointers to callbacks that the Moufiltr ISR callbacks can use.

Moufiltr Callback Routines

IOCTL_INTERNAL_MOUSE_CONNECT

The IOCTL_INTERNAL_MOUSE_CONNECT request connects Mouclass service to a mouse device.

IOCTL_INTERNAL_MOUSE_DISCONNECT

The IOCTL_INTERNAL_MOUSE_DISCONNECT request is completed by Moufiltr with an error status of STATUS_NOT_IMPLEMENTED.

For all other requests, Moufiltr skips the current IRP stack and sends the request down the device stack without further processing.

Callback routines

MouFilter_IsrHook

See PI8042_MOUSE_ISR.

A MouFilter_IsrHook callback is not needed if the default operation of I8042prt is sufficient.

Targus Input Devices Driver Device

The I8042prt mouse ISR calls MouFilter_IsrHook after it validates the interrupt.

To reset a mouse, I8042prt goes through a sequence of operational substates, each one of which is identified by an MOUSE_RESET_SUBSTATE enumeration value. For more information about how I8042prt resets a mouse and the corresponding mouse reset substates, see the documentation of MOUSE_RESET_SUBSTATE in ntdd8042.h.

Targus Input Devices Driver

MouFilter_IsrHook runs in kernel mode at the IRQL of the I8042prt mouse ISR.

MouFilter_ServiceCallback

See PSERVICE_CALLBACK_ROUTINE

Targus Input Devices Driver Updater

The ISR DPC of I8042prt calls MouFilter_ServiceCallback, which then calls MouseClassServiceCallback. A filter service callback can be configured to modify the input data that is transferred from the device's input buffer to the class data queue. For example, the callback can delete, transform, or insert data.