KeyEventArgsPhysicalKey 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) Version: 11.3.999
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