Selkies

lib/virtual-keyboard

The system's on-screen keyboard, raised for the session: a hidden text field (#keyboard-input-assist) takes the focus, and the input handler relays what is typed into it. Both cores keep one such field and answer the dashboard's showVirtualKeyboard with showVirtualKeyboard below.

Focus alone raises the keyboard on a phone, but not everywhere: Chromium on Windows leaves the touch keyboard down for a field focused by script from a tap elsewhere, and always while a keyboard is attached (a Surface with its cover on). Where the engine has the VirtualKeyboard API the field is set to the manual policy and the keyboard asked for outright, which the user's tap allows; with the manual policy the engine no longer hides it on blur, so the field does.

Variables

ASSIST_ID

const ASSIST_ID: "keyboard-input-assist" = 'keyboard-input-assist';

Defined in: lib/virtual-keyboard.js:24

The hidden field's id, which the input handler and the dashboards know it by.

Functions

keyboardAssist()

function keyboardAssist(): HTMLInputElement;

Defined in: lib/virtual-keyboard.js:30

The page's hidden field, added to the body the first time it is asked for.

Returns

HTMLInputElement

The field.


showVirtualKeyboard()

function showVirtualKeyboard(overlay): boolean;

Defined in: lib/virtual-keyboard.js:55

Raises the on-screen keyboard; the next touch of overlay (the stream) lowers it again.

Parameters

ParameterTypeDescription
overlayElementThe stream's input overlay.

Returns

boolean

Whether the keyboard was asked for.