Intermec PC43d Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 122

Defining Audio Beeps With KEY BEEP, Entering ASCII Characters With INPUT#, INPUT$, or LINE INPUT#

Page 122 highlights

Chapter 7 - Controlling the Printer Defining Audio Beeps With KEY BEEP Each time a key is pressed, the printer beeps (a 1200 Hz tone for 0.030 seconds). The frequency and duration of the signal can be globally changed for all keys using a KEY BEEP statement. Setting the frequency to a value higher than 9999 turns off the beep for all keys. Entering ASCII Characters With INPUT#, INPUT$, or LINE INPUT# Provided "console:" is OPENed for sequential INPUT, the keys can be used to enter ASCII characters to the program. For more information and an example, see "Input From a Random File" on page 48. Remapping the Keypad With KEYBMAP$ Printer keypads are fully remappable (exception for the Shift key), using the KEYBMAP$ command. Each key can produce two ASCII characters (shifted and unshifted). Mapping also decides the ID numbers for the keys. The basis of the remapping process is the position number of each key. For more information, see "Character Sets and Keywords" on page 133. Note: KEYBMAP$ instructions do not affect the printer in Setup Mode. The current keyboard mapping can be read to a string variable using the KEYBMAP$ command. This example reads the unshifted characters on the keyboard of a PF4i. Non-existing key positions get ASCII value 0: 10 PRINT "Pos","ASCII","Char." 20 A$=KEYBMAP$(0) 30 FOR B%=1 TO 64 40 C$=MID$(A$,B%,1) 50 E%=ASC(C$) 60 PRINT B%,E%,C$ 70 NEXT RUN You can also use the KEYBMAP$ instruction to remap the keyboard, with the following syntax: KEYBMAP$(n) = where: n = 0 maps the unshifted characters in ascending position number order. n = 1 maps the shifted characters in ascending position number order. Note: Position numbers and ID numbers are not the same thing. The string that contains the desired keyboard map should contain the desired character for each of 64 key positions (in ascending order) regardless if the keyboard contains that many keys. 110 Fingerprint Developer's Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

Chapter 7 — Controlling the Printer
110
Fingerprint Developer’s Guide
Defining Audio Beeps With KEY BEEP
Each time a key is pressed, the printer beeps (a 1200 Hz tone for 0.030 seconds). The
frequency and duration of the signal can be globally changed for all keys using a
KEY BEEP statement. Setting the frequency to a value higher than 9999 turns off
the beep for all keys.
Entering ASCII Characters With INPUT#, INPUT$, or LINE INPUT#
Provided “console:” is OPENed for sequential INPUT, the keys can be used to enter
ASCII characters to the program. For more information and an example, see
“Input
From a Random File” on page 48
.
Remapping the Keypad With KEYBMAP$
Printer keypads are fully remappable (exception for the
Shift
key), using the
KEYBMAP$ command. Each key can produce two ASCII characters (shifted and
unshifted). Mapping also decides the ID numbers for the keys.
The basis of the remapping process is the position number of each key. For more
information, see
“Character Sets and Keywords” on page 133
.
The current keyboard mapping can be read to a string variable using the
KEYBMAP$ command. This example reads the unshifted characters on the
keyboard of a PF4i. Non-existing key positions get ASCII value 0:
10
PRINT “Pos”,“ASCII”,“Char.”
20
A$=KEYBMAP$(0)
30
FOR B%=1 TO 64
40
C$=MID$(A$,B%,1)
50
E%=ASC(C$)
60
PRINT B%,E%,C$
70
NEXT
RUN
You can also use the KEYBMAP$ instruction to remap the keyboard, with the
following syntax:
KEYBMAP$(n) = <string>
where:
n = 0 maps the unshifted characters in ascending position number order.
n = 1 maps the shifted characters in ascending position number order.
The string that contains the desired keyboard map should contain the desired
character for each of 64 key positions (in ascending order) regardless if the keyboard
contains that many keys.
Note:
KEYBMAP$ instructions do not affect the printer in Setup Mode.
Note:
Position numbers and ID numbers are not the same thing.