[This is preliminary documentation and is subject to change.]

Returns a string corresponding to the key key.

Namespace:  CursesSharp
Assembly:  CursesSharp (in CursesSharp.dll) Version: (


public static string KeyName(
	int key
Visual Basic (Declaration)
Public Shared Function KeyName ( _
	key As Integer _
) As String
Visual C++
static String^ KeyName(
	int key


Type: System..::.Int32
Code of the key to find.

Return Value

String corresponding to the specified key.


Returns a string corresponding to the key key according to the following rules:
  • Printable characters are displayed as themselves, e.g. a one-character string containing the key.
  • Control characters are displayed in the ^X notation.
  • DEL (character 127) is displayed as ^?.
  • Values above 128 are either meta characters (if the screen has not been initialized, or if 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.
  • Values above 256 may be the names of function keys.
  • Otherwise (if there is no corresponding name), an exception is thrown.

See Also