Key Def - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

The <expansion token number> given in the KEY command may be in the range 0 to
31, or optionally 128 to 159 to reflect the key values. (See the key illustrationjn the
chapter entitled 'For your reference .... '.)
A total of 120 characters may be expanded into the <string expression>s. Attempting
to over-expand will produce an 'I m pro per a r gum en
t'
error (5).
Associated keywords: KEY D E F
KEY DEF
KEY DE F <key number> , <repeat>[, <normal>[, <shifted> [ , <control.]]]
KEY 159,"this is the tab key"
KEY DEF 68,1,159
.... now press the [TAB] key.
COMMAND: DE Fines the KEY values to be returned by the specified <key number>
in the range 0 to 79 {for an illustration of key numbers, refer to the diagram at the top
right hand side of the computer, or to the chapter entitled 'For your reference .... '). The
<normal>, <shifted>, and <control> parameters should contain the values required to be
returned when the key is pressed, alone, together with [SHIFn, and together with
[CONTROL], respectively. Each ofthese parameters is optional.
The <repeat> parameter enables you
to
set the key auto-repeat function on or off
(1
or
0),
the rate of auto-repeat being adjustable by use of the S PE E D KE Y command.
In the above example, key 159 (equivalent to expansion token 31) is first assigned to
an expansion string, then the KE Y DE F command defines key 68 (the [TAB] key)
to auto-repeat (1 ), and to return the <normal. value 1 59 when pressed alone.
In the above example, normal action would be restored by:
KEY DEF 68,0,9
.... where 9 is the normal ASCII value for [TAB]
Associated keywords: KEY, S P E E D KEY
Chapter 3 Page 38
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents