HardwareSimulationUS_KeyboardLayout Class

A prebuilt hardware keyboard layout.

Definition

Namespace: BeeMobile.VirtualKeyboard.Layouts
Assembly: BeeMobile.VirtualKeyboard.AVA.NET6 (in BeeMobile.VirtualKeyboard.AVA.NET6.dll) Version: 11.0.0.2+aef809e856abb10e94d0b4c45f10d1805addc36e
C#
public class HardwareSimulationUS_KeyboardLayout : KeyboardLayout
Inheritance
Object    AvaloniaObject    Animatable    StyledElement    Visual    Layoutable    Interactive    InputElement    Control    TemplatedControl    ContentControl    UserControl    KeyboardLayout    HardwareSimulationUS_KeyboardLayout

Remarks

This layout works differently then the others, it is wholly based on special keys. Because of this it needs extra code to do things that the Keyboard automates with normal layouts. However, with this approach we gain the ability to send key combinations (eg. Ctrl+C) into the application.

Constructors

HardwareSimulationUS_KeyboardLayout Creates a new instance of HardwareSimulationUS_KeyboardLayout.

Properties

LayoutName A name used to differentiate the Layout from other layouts.
(Overrides KeyboardLayoutLayoutName)

Methods

HandleSpecialKey This method is used to add custom handling for SpecialKey's and their combinations.
(Overrides KeyboardLayoutHandleSpecialKey(KeyModifiers, Key, ClickMode, IInputElement))
InitializeComponent Wires up the controls and optionally loads XAML markup and attaches dev tools (if Avalonia.Diagnostics package is referenced).
OnInitialized Called when the control finishes initialization.
(Overrides StyledElement.OnInitialized)
UpdateKeyVisuals A helper method that updates every key in the layout with a new string representation.

Fields

_altNumber Tracks the alt number, as number keys are pressed while alt is also pressed.
_lastKeyModifiers The last pressed modifier keys, useful for tracking changes.
_normalTranslations A standard map, it represents the default values for keys that do change depending on the state.
_shiftTranslations A shifted map, the translations when the shift key is pressed.
_translations The default map, contains translations that do not change when the modifiers keys are pressed.

See Also