KbFilter_IsrHook routine

The KbFilter_IsrHook routine is a template for a PI8042_KEYBOARD_ISR callback routine that customizes the operation of the I8042prt keyboard ISR.

Syntax

KbFilter_IsrHook KbFilter_IsrHook(
  _In_    PDEVICE_OBJECT       DeviceObject,
  _In_    PKEYBOARD_INPUT_DATA CurrentInput,
  _In_    POUTPUT_PACKET       CurrentOutput,
  _Inout_ UCHAR                StatusByte,
  _In_    PUCHAR               DataByte,
  _Out_   PBOOLEAN             ContinueProcessing,
  _In_    PKEYBOARD_SCAN_STATE ScanState
);

Parameters

  • DeviceObject [in]
    Pointer to the filter device object of the driver that supplies this callback.

  • CurrentInput [in]
    Pointer to the input KEYBOARD_INPUT_DATA structure that is being constructed by the ISR.

  • CurrentOutput [in]
    Pointer to an OUTPUT_PACKET structure that specifies the bytes that are being written to the hardware device.

  • StatusByte [in, out]
    Specifies the status byte that is read from I/O port 60 when an interrupt occurs.

  • DataByte [in]
    Specifies the data byte that is read from I/O port 64 when an interrupt occurs.

  • ContinueProcessing [out]
    Specifies, if TRUE, to continue processing in the I8042prt keyboard ISR after this callback returns; otherwise, processing is not continued.

  • ScanState [in]
    Pointer to a KEYBOARD_SCAN_STATE structure that specifies the keyboard scan state.

Return value

KbFilter_IsrHook returns TRUE if the interrupt service routine should continue; otherwise it returns FALSE.

Remarks

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 ISR.

Requirements

Target platform

Header

Ntdd8042.h (include Ntdd8042.h)

IRQL

See Remarks section.

See also

KEYBOARD_SCAN_STATE

PI8042_KEYBOARD_ISR

 

 

Send comments about this topic to Microsoft