Table of Contents

Class PhysicalKeyExtensions

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll

Contains extension methods related to PhysicalKey.

public static class PhysicalKeyExtensions
Inheritance
PhysicalKeyExtensions
Inherited Members

Methods

ToQwertyKey(PhysicalKey)

Maps a physical key to a corresponding key, if possible, on a QWERTY keyboard.

public static Key ToQwertyKey(this PhysicalKey physicalKey)

Parameters

physicalKey PhysicalKey

the physical key to map.

Returns

Key

The key corresponding to physicalKey, or None.

ToQwertyKeySymbol(PhysicalKey, bool)

Maps a physical key to a corresponding key symbol, if possible, on a QWERTY keyboard.

public static string? ToQwertyKeySymbol(this PhysicalKey physicalKey, bool useShiftModifier = false)

Parameters

physicalKey PhysicalKey

the physical key to map.

useShiftModifier bool

Indicates whether the Shift key is considered pressed.

Returns

string

The key corresponding to physicalKey, or None.