HTBasic Help
×
Menu
Index

KBD$

Returns the contents of the ON KBD buffer.
 
 KBD$
 
Usage:
PRINT KBD$;
Buff$=Buff$&KBD$
A$=KBD$
 
Example:          KBD$.BAS
 
Description:
When ON KBD is enabled all keystrokes are trapped and held in the keyboard buffer. KBD$ returns the keyboard buffer contents and then clears it. The buffer is also cleared by the commands: OFF KBD, ENTER KBD, INPUT, LINPUT, SCRATCH and SCRATCH A and by the RESET key. If no key was pressed or if ON KBD is disabled by OFF KBD, the string length is set to zero.
 
The keyboard buffer can store up to 256 characters. When the buffer is full entering more characters generates a beep and discards the character. Function keys generate 2 bytes. The first byte is 255 and the second byte specifies the function key.
 
See Also: