\fBtermkey_snprint_key\fP formats a string buffer to contain a human-readable representation of a key event. It fills the \fIbuffer\fP in a way analogous to the \fBsnprintf\fP(3) standard library function.
.PP
The \fIformat\fP argument specifies the format of the output, as a bitmask of the following constants:
.TP
.BTERMKEY_FORMAT_LONGMOD
Print full modifier names e.g. "Shift-" instead of abbreviating to "S-".
.TP
.BTERMKEY_FORMAT_CARETCTRL
If the only modifier is \fBTERMKEY_MOD_CTRL\fP on a plain letter, render it as "^X" rather than "Ctrl-X".
.TP
.BTERMKEY_FORMAT_ALTISMETA
Use the name "Meta" or the letter "M" instead of "Alt" or "A".
.TP
.BTERMKEY_FORMAT_WRAPBRACKET
If the key event is a special key instead of unmodified Unicode, wrap it in "<brackets>".