|
NAMEtermkey_strfkey - format a string representing a key eventSYNOPSIS#include <termkey.h> size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, TermKeyFormat format); Link with -ltermkey. DESCRIPTIONtermkey_strfkey() formats a string buffer to contain a human-readable representation of a key event. It fills the buffer in a way analogous to the snprintf(3) or strftime(3) standard library functions. This function used to be called termkey_snprint_key() but was renamed after version 0.6.The format argument specifies the format of the output, as a bitmask of the following constants:
The following shortcuts are provided for common combinations of format bits:
When formatting a TERMKEY_TYPE_UNICODE key structure, this function uses the utf8 member. If this member contains an empty string (i.e. its first character is 0) then this member will be prefilled by the function from the code.number member. This can be convenient when the key structure is being constructed programmatically by user code. RETURN VALUEtermkey_strfkey() returns the number of characters written to buffer.SEE ALSOtermkey_new(3), termkey_getkey(3), termkey_waitkey(3), termkey_get_keyname(3), termkey_strpkey(3), termkey(7) Visit the GSP FreeBSD Man Page Interface. |