Microsoft KB Archive/32735

PRB: Problems Inputting ALT+Q and ALT+R in Cooked Mode ID Number: Q32735

2.x 3.x 4.00 4.00a 4.01 4.01a 5.00 MS-DOS

Summary:

SYMPTOMS MS-DOS interrupt 21h services 01h (keyboard input) and 08h (keyboard input without echo) both do not return the expected code for the keystrokes ALT+Q and ALT+R. All other keystrokes return the correct codes.

CAUSE The application has the console device in cooked mode and needs to be in raw mode. Certain key codes will be acted upon by MS-DOS, which does not know the difference between a first and second byte. When you get the second byte for ALT+Q, it is 10h, which is also CTRL+P, so MS-DOS grabs the keystroke, taking it to mean “toggle the printer.” The same thing will happen for ALT+R, the second byte of which maps into CTRL+S.

RESOLUTION To set the console device into raw mode, use MS-DOS interrupt 21h service 44h (the IOCTL service).

Additional reference words: 2.x 3.x 4.00 4.00a 4.01 4.01a 5.00