mov ah, UpDownFlag ; 00h for down stroke, 80h for up stroke
mov al, VirtualKey ; Windows virtual-key code
mov bh, PrefixFlag ; 00h if no prefix, 1 if 0E0h prefix byte
mov bl, ScanCode ; hardware scan code
mov si, word ptr [ExtraInfo]
mov di, word ptr [ExtraInfo+2] ; extra information
call [Keyboard_Event] ; keyboard-event function
Records a keystroke. The keystroke may subsequently be used to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls this function.
Although the keyboard driver passes the hardware-scan code (which is OEM-dependent) to Windows, Windows does not use the code. Instead, Windows subsequently passes the scan code to the ToAscii function, which may use it for special purposes. The interrupt handler sets the up/down bit in the scan code to 0.
This interrupt handler may process some keystrokes without passing them to Windows through the keyboard-event callback function. In particular, the handler processes CTRL+ALT+SYSREQ keytrokes and generates a nonmaskable interrupt (NMI). Under certain circumstances, the driver's interrupt handler passes keystrokes to the original keyboard-interrupt handler. This is the case for CTRL+ALT+DELETE key combination and for the PAUSE key.
Use the PRINTSCREEN key to take a screen snapshot, which is saved in the Windows clipboard. This is handled in the interrupt routine by calling the event procedure with VK_SNAPSHOT in AL, with the value equal to 0 (for full-screen snapshot) or 1 (for active-window snapshot) in BL.
Enable, ToAscii