Method ToString
ToString()
Pretty prints the Key.
public override string ToString()
Returns
ToString(KeyCode)
Formats a KeyCode as a string using the default separator of '+'
public static string ToString(KeyCode key)
Parameters
key
KeyCodeThe 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
KeyCodeThe key to format.
separator
RuneThe 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.