PFKEY(3R)

NAME
pfkey - get programmable function (PF) key strings

SYNOPSIS
int pfkey (keynum, str, maxlen)
int keynum, maxlen;
char *str;

DESCRIPTION
The pfkey function places up to (maxlen-1) characters from the given programmable function (PF) key keynum into the character array str which must be big enough to accept them. When pfkey encounters a null value or it has processed the (maxlen-1) th character, pfkey terminates the string with a NULL and returns the length of the string.

The value of keynum must be between 0x80 and 0x87, inclusive, which corresponds to PF key F1 to F8 on the keyboard. Each PF key can store up to 80 characters plus a NULL in the non-volatile BRAM space of the terminal.

EXAMPLE
The following code displays the value of programmable function key F1 on the window.

    #include <dmd.h>
    #define MAXPFKEY 80
    showf1 () {
        char pfval[MAXPFKEY+1];
        pfkey (0x80, pfval, MAXPFKEY+1);
        jstring (pfval);
    }

SEE ALSO
keyboard(3R).