📄 keyname.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>keyname</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_009_038"> </a>NAME</h4><blockquote>keyname, key_name - get name of key</blockquote><h4><a name = "tag_001_009_039"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>char *keyname(int <i>c</i>);char *key_name(wchar_t <i>c</i>);</code></pre></blockquote><h4><a name = "tag_001_009_040"> </a>DESCRIPTION</h4><blockquote>The<i>keyname()</i>and<i>key_name()</i>functions generate a character string whose value describes the key <i>c</i>.The <i>c</i> argument of<i>keyname()</i>can be an 8-bit character or a key code. The <i>c</i> argument of<i>key_name()</i>must be a wide character.<p>The string has a format according to the first applicable row in thefollowing table:<p><p><table bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Input </b><th align=center><b>Format of Returned String</b><tr valign=top><td align=left>Visible character<td align=left>The same character<tr valign=top><td align=left>Control character<td align=left>^<i>X</i><tr valign=top><td align=left>Meta-character (<i>keyname()</i> only)<td align=left>M-<i>X</i><tr valign=top><td align=left>Key value defined in <</i><b>curses.h</b><i>> (<i>keyname()</i> only)<td align=left>KEY_<i>name</i><tr valign=top><td align=left>None of the above<td align=left>UNKNOWN KEY</table><p>The meta-character notation shown above is used only if meta-characters areenabled.</blockquote><h4><a name = "tag_001_009_041"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i>keyname()</i>returns a pointer to a string as described above. Otherwise, it returnsa null pointer.</blockquote><h4><a name = "tag_001_009_042"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_001_009_043"> </a>APPLICATION USAGE</h4><blockquote>The return value of<i>keyname()</i>and<i>key_name()</i>may point to a static area which is overwritten by a subsequent call toeither of these functions.<p>Applications normally process meta-characters without storing them into awindow. If an application stores meta-characters in a window and tries toretrieve them as wide characters,<i>keyname()</i>cannot detect meta-characters, since wide characters do not supportmeta-characters.</blockquote><h4><a name = "tag_001_009_044"> </a>SEE ALSO</h4><blockquote><i><a href="meta.html">meta()</a></i>,<i><a href="curses.h.html"><curses.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -