'\" te .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved .TH keyname 3XCURSES "5 Jun 2002" "SunOS 5.11" "X/Open Curses Library Functions" .SH NAME keyname, key_name \- return character string used as key name .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ] \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ] #include \fBchar *\fR\fBkeyname\fR(\fBint\fR \fIc\fR); .fi .LP .nf \fBchar *\fR\fBkey_name\fR(\fBwchar_t\fR \fIwc\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIc\fR\fR .ad .RS 6n .rt Is an 8 bit-character or a key code. .RE .sp .ne 2 .mk .na \fB\fBwc\fR\fR .ad .RS 6n .rt Is a wide character key name. .RE .SH DESCRIPTION .sp .LP The \fBkeyname()\fR function returns a string pointer to the key name. Make a duplicate copy of the returned string if you plan to modify it. .sp .LP The \fBkey_name()\fR function is similar except that it accepts a wide character key name. .sp .LP The following table shows the format of the key name based on the input. .sp .sp .TS tab() box; lw(1.99i) lw(3.51i) lw(1.99i) lw(3.51i) . \fBInput\fR\fBFormat of Key Name\fR Visible characterThe same character Control character\fB^\fR\fIX\fR Meta-character (\fBkeyname()\fR only)\fBM-\fR\fIX\fR T{ Key value defined in \fB\fR (\fBkeyname()\fR only) T}\fBKEY_\fR\fIname\fR None of the above\fBUNKNOWN KEY\fR .TE .sp .LP In the preceding table, \fIX\fR can be either a visible character with the high bit cleared or a control character. .SH RETURN VALUES .sp .LP On success, these functions return a pointer to the string used as the key's name. Otherwise, they return a null pointer. .SH ERRORS .sp .LP None. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelUnsafe _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBlibcurses\fR(3XCURSES), \fBmeta\fR(3XCURSES), \fBattributes\fR(5), \fBstandards\fR(5)