Personal Computer News
1st September 1984Categories: Letter
Author: Bill Robert
Published in Personal Computer News #076
Amstrad Snippets - Hints and Niggles
I have found that I keep hitting the ESCAPE key on the Amstrad keyboard when I really want to enter '1', both when entering line numbers and when making numerical inputs. This can be avoided by entering:
KEY DEF 66,1,0
The unshifted ESCAPE key will not now cause a BREAK, but still has its normal function with either CTRL or SHIFT.
I found the Amstrad manual rather unhelpful regarding the function keys. The codes for the numeric keyboard are given but where are the expansion codes 141 to 159? It appears they are not actually anywhere but must be assigned to the desired keys. For example:
KEY DEF 71,1,122,90,150
KEY 150, 'TEST MESSAGE'
Entering the above will result in the 'Z' key having its normal functions when unshifted and with SHIFT or CAPS LOCK, but when used with CTRL it will give TEST MESSAGE, or whatever else you assign to the key code.
On the subject of the function keys, a maximum of 120 characters for all of them is not much, but it can be increased to a couple of thousand, with a slight reduction in the ease of use.
To use the '1' key on the numeric pad as an example:
KEY 129, 'KI$' + CHR$(13)
LET K1$='any string up to 255 characters maximum'
Type in and enter the above, and then type in PRINT and press the '1' key on the numeric pad. The string assigned to K1$ is printed onto the screen, and can then be utilised as a direct command line, or placed in a program line, by using the copy cursor.
This is not quite as convenient as the normal method, but each function key only has to hold four characters (using K1$, K2$, etc.), so up to 30 keys could be programmed with strings of length 255, giving 7.5K of user functions.
Bill Robert, Pencoed, Mid Glamorgan