Int 15 Fn 12 - Topview - Send Message - "setesc" - Set Escape Routine Ad [Q]

AH = 12h
BH = 14h
BL = message modifier
00h handle is DWORD on top of stack
01h define user stream
04h intercept keystrokes from KEYBOARD to window (handle on stack)
05h intercept keystrokes from task's default KEYBOARD to a window
STACK: (if window) DWORD user stream number (14h-1Fh)
DWORD address of FAR user stream handler
(if keyboard) DWORD address of FAR filter function (see #0378)

Return: STACK popped

(Table 0378)
Values keyboard filter function is called with when keyboard is in field mode:
AL = character
AH = 00h or extended ASCII code if AL = 00h
BL = field number
CH = cursor column
CL = cursor row
DL = field type modifier (sixth item in field table entry)
DH = seventh item in field table entry
ES:SI = window's handle
DS:DI -> field table entry for field containing the cursor

Return: AH = action to take
00h use keystroke
01h ignore keystroke
FFh beep and ignore keystroke

Note: the filter function is not allowed to make INT 15, DOS, or BIOS calls