Table of Contents

Method ToString

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ToString()

Pretty prints the Key.

public override string ToString()

Returns

string

ToString(KeyCode)

Formats a KeyCode as a string using the default separator of '+'

public static string ToString(KeyCode key)

Parameters

key KeyCode

The key to format.

Returns

string

The formatted string. If the key is a printable character, it will be returned as a string. Otherwise, the key name will be returned.

ToString(KeyCode, Rune)

Formats a KeyCode as a string.

public static string ToString(KeyCode key, Rune separator)

Parameters

key KeyCode

The key to format.

separator Rune

The character to use as a separator between modifier keys and the key itself.

Returns

string

The formatted string. If the key is a printable character, it will be returned as a string. Otherwise, the key name will be returned.