Programming Guide



sm_keylabel

Gets the printable name of a logical key

#include <smkeys.h>
int sm_keylabel(char *key);

key
The logical key whose key label is sought.

Returns

Description

sm_keylabel returns the label defined for key in the key translation file—for example, End for the XMIT key. If no label exists, the function returns the name of the logical key. Refer to Table 6-1in Configuration Guide for a list of Panther logical keys.

If the value of key is undefined in smkeys.h, the function returns an empty string.

Example

#include <smkeys.h>

/* Put the name of the TRANSMIT key into a field
* for help purposes. */

char buf[80];

sprintf(buf, "Press %s to commit the transaction.",
sm_keylabel(XMIT));
sm_n_putfield("help", buf);