Evaluate SCANCODE keystrokes

One of two ways to read the keyboard.

Great for commandline menus

You could build a scroll window of special apps on your drive.

Collect characters for a password

As readkey does not echo the keys to the screen.

The alternative uses the Keyboard event driver

As you can see this is the easiest way to interact with the keyboard, even over SSH/Telnet.

Program WaitForESCAPE.v1180922; uses Display; var Ch:Char; Begin Writeln('This will show the scan code for every keystroke.'); Repeat Ch:=ReadKey; If Ch=#0 then Begin Write('#0'); Ch:=ReadKey; End; Writeln('#',Ord(Ch)); Until Ch=#27; End.

Output from code above...