The unique feature of the ZX Spectrum keyboard characters comprises not only the single symbols (letters, digits, etc), but also the compound tokens (keywords, function names, etc) and all these are entered from the keyboard rather than being spelled out individually.
To obtain all these functions and commands, some keys have five or more distinct meanings, given partly by shifting the keys (i.e. pressing either the CAPS SHIFT key or the SYMBOL SHIFT key at the same time as the required one) and partly by having the machine in different modes.
Keyword INPUT definition follows;
The ' . . . ' is a sequence of INPUT items, separated as in a PRINT statement by commas, semicolons or apostrophes. An INPUT item can be:
i) Any PRINT item not beginning with a letter
ii) A variable name, or
iii) LINE, then a string type variable name.
The PRINT items and separators in (i) are treated exactly as in PRINT, except that everything is printed in the lower part of the screen. For (ii) the computer stops and waits for input of an expression from the keyboard; the value of this is assigned to the variable.
The input is echoed in the usual way and syntax errors give the flashing ?. For string type expressions, the input buffer is initialised to contain two string quotes (which can be erased if necessary). If the first character in the input is STOP, the program stops with error H. (iii) is like (ii) except that the input is treated as a string literal without quotes, and the STOP mechanism doesn't work; to stop it you must type cursor down instead.