/// <summary> /// Returns a string corresponding to the key <paramref name="key"/>. /// </summary> /// <remarks> /// Returns a string corresponding to the key <paramref name="key"/> /// according to the following rules: /// <list type="bullet"> /// <item> /// <description> /// Printable characters are displayed as themselves, e.g. /// a one-character string containing the key. /// </description> /// </item> /// <item> /// <description> /// Control characters are displayed in the ^X notation. /// </description> /// </item> /// <item> /// <description> /// DEL (character 127) is displayed as ^?. /// </description> /// </item> /// <item> /// <description> /// Values above 128 are either meta characters (if the screen /// has not been initialized, or if <see cref="WindowBase.Meta"/> /// has been set to true), shown in the M-X notation, or are /// displayed as themselves, in which case the values may /// not be printable. /// </description> /// </item> /// <item> /// <description> /// Values above 256 may be the names of function keys. /// </description> /// </item> /// <item> /// <description> /// Otherwise (if there is no corresponding name), an exception /// is thrown. /// </description> /// </item> /// </list> /// </remarks> /// <param name="key">Code of the key to find.</param> /// <returns>String corresponding to the specified key.</returns> public static string KeyName(int key) { return(CursesMethods.keyname(key)); }