IOCTL_KEYBOARD_SET_TYPEMATIC control code
The IOCTL_KEYBOARD_SET_TYPEMATIC request sets the typematic parameters.
Kbdclass copies the current stack location, sets the MajorFunction member of the new stack location to IRP_MJ_INTERNAL_DEVICE_CONTROL, and sends this request down the device stack.
Note that if there is a grandmaster device, Kbdclass normally sets the typematic settings of all the subordinate class devices to the same global setting. This operation is controlled by the grandmaster's registry entry value SendOutputToAllPorts under the key HKLM\Services\CurrentControlSet\Kbdclass\Parameters.
The Parameters.DeviceIoControl.InputBufferLength member is set to a value greater than or equal to the size, in bytes, of a KEYBOARD_TYPEMATIC_PARAMETERS structure.
The AssociatedIrp.SystemBuffer member points to a client-allocated KEYBOARD_TYPEMATIC_PARAMETERS structure. The client sets the UnitId, Rate, and Delay member values.
The Information member is set to zero.
The Status member is set to one of the following values:
The request completed successfully.
Parameters.DeviceIoControl.InputBufferLength is less than the size, in bytes, of a KEYBOARD_TYPEMATIC_PARAMETERS structure.
The UnitId value is invalid.
The operation timed out.