|
|
1.1 root 1: .ds ZZ DEVELOPMENT PACKAGE
2: .TH PFKEY 3R "630 MTG"
3: .XE "pfkey()"
4: .SH NAME
5: pfkey \- get programmable function (PF) key strings
6: .SH SYNOPSIS
7: .ft B
8: int pfkey (keynum, str, maxlen)
9: .br
10: int keynum, maxlen;
11: .br
12: char \(**str;
13: .SH DESCRIPTION
14: The
15: .I pfkey
16: function
17: places up to
18: (\f2maxlen\f1-1)
19: characters from the given programmable function (PF) key
20: .I keynum
21: into the character array
22: \f2str\f1
23: which must be big enough to accept them.
24: When
25: .I pfkey
26: encounters a null value or it has processed the
27: (\f2maxlen\f1-1) th
28: character,
29: .I pfkey
30: terminates the string with a \s-1NULL\s+1 and returns the length of the string.
31: .PP
32: The value of
33: .I keynum
34: must be between 0x80 and 0x87, inclusive, which corresponds to PF key F1 to F8 on the
35: keyboard.
36: Each PF key
37: can store up to 80 characters plus a NULL in the non-volatile BRAM space of the
38: terminal.
39: .SH EXAMPLE
40: The following code displays the value of programmable function key F1 on the window.
41: .PP
42: .RS 3
43: .nf
44: .ft CM
45: #include <dmd.h>
46:
47: #define MAXPFKEY 80
48:
49: showf1 () {
50: char pfval[MAXPFKEY+1];
51:
52: pfkey (0x80, pfval, MAXPFKEY+1);
53: jstring (pfval);
54: }
55: \fR
56: .fi
57: .RE
58:
59:
60: .SH SEE ALSO
61: keyboard(3R).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.