Skip to main content

PhysicalKey Property

Gets the physical key for the associated event.

This value is independent of the current keyboard layout and usually correspond to the key printed on a standard US English QWERTY keyboard.

Definition​

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

public PhysicalKey PhysicalKey { get; init; }

Property Value​

PhysicalKey

Remarks​

Use this property if you need to refer to a key given its position on the keyboard (a common usage is moving the player with WASD-like keys).

See Also​

Reference​

KeyEventArgs Class
Avalonia.Input Namespace
Key
KeySymbol