Programming instructions

39
Intermec Fingerprint 6.13 – Programmer's Guide
ON KEY...GOSUB
Many Fingerprint-compatible EasyCoder printer models are pro-
vided with a built-in keyboard. However, unless there is a program
running in the printer, e.g. the Stand-Alone program or Shell, the
keys have no purpose (with the exception of <Print>, <Feed>, and
<Setup/Save> keys, which work in the Immediate Mode). To make
use of the keyboard, each key must be enabled individually by
means of a KEY ON statement and then be assigned to a subroutine
using an ON KEY GOSUB statement. The subroutine should
contain the instructions you want to be performed when the key is
pressed.
In the statements KEY (<id.>), ON KEY (<id.>) OFF, and ON
KEY (<id.>) GOSUB..., the keys are specified by id. numbers
enclosed by parentheses, see chapter 15.1.
Note that ON KEY...GOSUB excludes input from the printer's
keyboard (see chapter 7.6) and vice versa.
This example shows how the two keys <F1> (id. No. 10) and <F2>
(id. No. 11) are used to change the printer's setup in regard of
printout contrast.
10 PRPOS 100,500
20 PRLINE 100,100
30 FONT "SW030RSN"
40 PRPOS 100,300
50 MAG 4,4
60 PRTXT "SAMPLE"
70 KEY (10) ON : KEY (11) ON
80 ON KEY (10) GOSUB 1000
90 ON KEY (11) GOSUB 2000
100 GOTO 70
110 PRINTFEED
120 END
1000 SETUP "CONTRAST,0"
1010 PRPOS 100,100 : PRTXT "Weak Print"
1020 RETURN 110
2000 SETUP "CONTRAST,10"
2010 PRPOS 100,100 : PRTXT "Dark Print"
2030 RETURN 110
RUN
5. FINGERPRINT PROGRAMMING, cont'd.
8. Conditional Branching,
cont'd.
Keyboard Control and Key Id. No:s
Also see:
Chapter 15.1