Skip to main content

FormatKey Method

Checks the platformKeyOverrides and s_commonKeyOverrides Dictionaries, in order, for the appropriate string to represent the given Key on this platform. NOTE: If platformKeyOverrides is null, this is assumed to be the Invariant and the Dictionaries are not checked. The plain Enum string is returned instead.

Definition​

Namespace: Avalonia.Input.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public string FormatKey(
Key key
)

Parameters​

  Key
The Key to format.

Return Value​

String
The appropriate platform specific or common override if present, key.ToString() if not or this is the Invariant.

See Also​

Reference​

KeyGestureFormatInfo Class
Avalonia.Input.Platform Namespace