VirtualKeyboard Class
The on-screen keyboard of a window (https://w3c.github.io/virtual-keyboard/#the-virtualkeyboard-interface, navigator.virtualKeyboard): it is shown and hidden with VirtualKeyboardOptions, and its geometry is read from the VirtualKeyboardProvider of the browsing context. Only the top-level documents get the geometry of the keyboard; the rectangle of the documents of the nested browsing contexts stays empty.
public sealed class VirtualKeyboard : EventTarget- Inheritance
EventTargetVirtualKeyboard
Properties
| Name | Description |
|---|---|
| BoundingRect | Gets the intersection of the keyboard with the viewport of the document, in client coordinates. |
| OnGeometryChange | Gets or sets the event handler of the geometrychange event. |
| OverlaysContent | Gets or sets whether the keyboard overlays the content: the viewport is not resized when the keyboard is shown, and the keyboard-inset-* environment variables give its geometry. It can only be set in a top-level browsing context. |
BoundingRect
VirtualKeyboard.csGets the intersection of the keyboard with the viewport of the document, in client coordinates.
public DomRect BoundingRect { get; }Property value
See also
OnGeometryChange
VirtualKeyboard.csGets or sets the event handler of the geometrychange event.
OverlaysContent
VirtualKeyboard.csGets or sets whether the keyboard overlays the content: the viewport is not resized when the keyboard is shown, and the keyboard-inset-* environment variables give its geometry. It can only be set in a top-level browsing context.
public bool OverlaysContent { get; set; }Property value
See also
Methods
| Name | Description |
|---|---|
| Hide() | Hides the on-screen keyboard (https://w3c.github.io/virtual-keyboard/#dom-virtualkeyboard-hide), with VirtualKeyboardOptions.Hide. |
| Show() | Shows the on-screen keyboard (https://w3c.github.io/virtual-keyboard/#dom-virtualkeyboard-show), with VirtualKeyboardOptions.Show. |
Hide()
VirtualKeyboard.csHides the on-screen keyboard (https://w3c.github.io/virtual-keyboard/#dom-virtualkeyboard-hide), with VirtualKeyboardOptions.Hide.
public void Hide()Show()
VirtualKeyboard.csShows the on-screen keyboard (https://w3c.github.io/virtual-keyboard/#dom-virtualkeyboard-show), with VirtualKeyboardOptions.Show.
public void Show()