The system-supplied keyboard class driver passes most IRP_MJ_DEVICE_CONTROL requests on to the underlying port driver as IRP_MJ_INTERNAL_DEVICE_CONTROL requests. In addition, the class driver communicates with the port driver using driver-defined I/O control codes and driver-created IRPs set up with IRP_MJ_INTERNAL_DEVICE_CONTROL and one of the IOCTL_INTERNAL_KEYBOARD_XXX.
The keyboard class driver passes this request on to the port driver, which returns the KEYBOARD_ATTRIBUTES information.
Parameters.DeviceIoControl.OutputBufferLength indicates the size in bytes of the output buffer, which must be >= sizeof(KEYBOARD_ATTRIBUTES).
The driver returns the KEYBOARD_ATTRIBUTES data to the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes of returned attribute data if the Status field is set to STATUS_SUCCESS. Otherwise, the Status field can be set to STATUS_INVALID_PARAMETER or to STATUS_BUFFER_TOO_SMALL.
The class driver passes this request on to the port driver, which returns the KEYBOARD_TYPEMATIC_PARAMETERS information.
The buffer at Irp->AssociatedIrp.SystemBuffer contains a UnitId value identifying the target keyboard port. The driver should validate the input UnitId before collecting the requested typematic information.
Parameters.DeviceIoControl.OutputBufferLength indicates the size in bytes of the output buffer, which must be >= sizeof(KEYBOARD_TYPEMATIC_PARAMETERS).
The driver returns the KEYBOARD_TYPEMATIC_PARAMETERS data to the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes of returned typematic data if the Status field is set to STATUS_SUCCESS. Otherwise, the Status field can be set to STATUS_INVALID_PARAMETER if the input UnitId is invalid or to STATUS_BUFFER_TOO_SMALL.
The keyboard class driver passes this request to the port driver, so that it can set the typematic rate and delay on the device.
The buffer at Irp->AssociatedIrp.SystemBuffer contains the KEYBOARD_TYPEMATIC_PARAMETERS data specifying the rate and delay values. Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the buffer’s size in bytes. The driver should validate the input UnitId, before resetting the typematic rate and delay.
None
The Information field is set to zero. If the Status field is not set to STATUS_SUCCESS, it can be set to STATUS_INVALID_PARAMETER if the input UnitId is invalid, to STATUS_PARITY_ERROR if the number of retries exceeds the driver’s limit, to STATUS_IO_TIMEOUT if the requested operation timed out on the device, or to STATUS_BUFFER_TOO_SMALL.
The class driver passes this request on to the port driver, which returns the KEYBOARD_INDICATOR_PARAMETERS information.
The buffer at Irp->AssociatedIrp.SystemBuffer contains a UnitId value identifying the target keyboard port. The driver should validate the input UnitId before collecting the requested indicators information.
Parameters.DeviceIoControl.OutputBufferLength indicates the size in bytes of the output buffer, which must be >= sizeof(KEYBOARD_INDICATOR_PARAMETERS).
The driver returns the KEYBOARD_INDICATOR_PARAMETERS data to the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes of returned indicator data if the Status field is set to STATUS_SUCCESS. Otherwise, it can be set to STATUS_INVALID_PARAMETER if the input UnitId is invalid or to STATUS_BUFFER_TOO_SMALL.
The keyboard class driver passes this request to the port driver, which sets the indicators on the device.
The buffer at Irp->AssociatedIrp.SystemBuffer contains the KEYBOARD_INDICATOR_PARAMETERS to be set on the device. Parameters.DeviceIoControl.InputBufferLength indicates the size in bytes of the buffer, which must be >= sizeof(KEYBOARD_INDICATOR_PARAMETERS).
The buffer at Irp->AssociatedIrp.SystemBuffer contains a UnitId value identifying the target keyboard port. The driver should validate the input UnitId before resetting the indicators.
None
The Information field is set to zero. If the Status field is not set to STATUS_SUCCESS, it can be set to STATUS_INVALID_PARAMETER if the input UnitId is invalid, to STATUS_PARITY_ERROR if the number of retries exceeds the driver’s limit, to STATUS_IO_TIMEOUT if the requested operation timed out on the device, or to STATUS_BUFFER_TOO_SMALL.
The class driver passes this request on to the port driver, which returns the KEYBOARD_INDICATOR_TRANSLATION information.
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size in bytes of the output buffer, which must be >= sizeof(KEYBOARD_INDICATOR_TRANSLATION). Note that this structure contains a variable-sized array of INDICATOR_LIST entries, and the size of this array depends on the device-specific number of indicators.
The driver returns the KEYBOARD_INDICATOR_TRANSLATION data to the buffer at Irp->AssociatedIrp.SystemBuffer.
The Information field is set to the number of bytes of returned translation data if the Status field is set to STATUS_SUCCESS. Otherwise, the Status field can be set to STATUS_INVALID_PARAMETER if the input UnitId is invalid or to STATUS_BUFFER_TOO_SMALL.
None. This request is intercepted within the Win32 subsystem.
After the class driver has opened the device object representing the keyboard port, the class driver sets up and sends this request to the port driver in order to establish a connection to the port device.
The buffer at Parameters.DeviceIoControl.Type3InputBuffer contains the CONNECT_DATA, including a pointer to the class device object and a pointer to the class service callback routine. Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the input buffer’s size in bytes.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or to STATUS_NO_SUCH_DEVICE if the device is not present, to STATUS_SHARING_VIOLATION if the device is already connected, or to STATUS_INVALID_PARAMETER if the connection data is not valid.
None. Currently, the keyboard device cannot be unloaded dynamically so this request is never sent to the port driver.
Enables keyboard interrupts at the request of the class driver, which has just been sent a create request.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or to STATUS_DEVICE_DATA_ERROR if the device interrupt could not be enabled.
Disables keyboard interrupts at the request of the class driver, which has just been sent a close request.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or to STATUS_DEVICE_DATA_ERROR if the device interrupt could not be disabled or was already disabled.