VirtualKeyboardProvider Class

The on-screen keyboard of the device (https://w3c.github.io/virtual-keyboard/), read by navigator.virtualKeyboard, of the browsing contexts that share a BrowsingContextOptions (VirtualKeyboardOptions.Provider). Set VirtualKeyboardProvider.BoundingRect when the keyboard is shown, moved or hidden: the documents update their boundingRect and fire their geometrychange events.

public class VirtualKeyboardProvider

Remarks

A provider can be shared by several browsing contexts, and used from any thread.

Constructors

NameDescription
VirtualKeyboardProvider()

VirtualKeyboardProvider()

VirtualKeyboard.cs
public VirtualKeyboardProvider()

No documentation is available.

Properties

NameDescription
BoundingRectGets or sets the rectangle of the keyboard, relative to the viewport of the top-level documents (empty when the keyboard is hidden, the default). Setting it updates the VirtualKeyboard objects of the documents, which fire their geometrychange events.

BoundingRect

VirtualKeyboard.cs

Gets or sets the rectangle of the keyboard, relative to the viewport of the top-level documents (empty when the keyboard is hidden, the default). Setting it updates the VirtualKeyboard objects of the documents, which fire their geometrychange events.

public VirtualKeyboardRect BoundingRect { get; set; }

Property value

VirtualKeyboardRect

Methods

NameDescription
GetBoundingRect()Returns the rectangle of the keyboard. The default implementation returns VirtualKeyboardProvider.BoundingRect. It is called on the thread of an event loop, and must not block it.
OnGeometryChanged()Raises VirtualKeyboardProvider.GeometryChanged, then reads the rectangle again for the VirtualKeyboard objects of the documents, which fire their geometrychange events. It can be called from any thread.

GetBoundingRect()

VirtualKeyboard.cs

Returns the rectangle of the keyboard. The default implementation returns VirtualKeyboardProvider.BoundingRect. It is called on the thread of an event loop, and must not block it.

public virtual VirtualKeyboardRect GetBoundingRect()

OnGeometryChanged()

VirtualKeyboard.cs

Raises VirtualKeyboardProvider.GeometryChanged, then reads the rectangle again for the VirtualKeyboard objects of the documents, which fire their geometrychange events. It can be called from any thread.

protected void OnGeometryChanged()

Events

NameDescription
GeometryChangedRaised when the geometry of the keyboard changes (VirtualKeyboardProvider.OnGeometryChanged).

GeometryChanged

Raised when the geometry of the keyboard changes (VirtualKeyboardProvider.OnGeometryChanged).

public event EventHandler? GeometryChanged