The Apple II serial interface (Apple IIc serial port, Apple IIGS serial port, and Apple IIe Super Serial Card) has a built-in command that disables the keyboard during serial I/O. The command is FD. Here's how to send it from BASIC:
10 print chr$(4);"pr#2"
20 print chr$(1);"FD": REM Disable the keyboard...
Article Change History:
17 Feb 1997 - Reviewed for technical accuracy, revised formatting.