<br />

> [!NOTE]
> **Important:** This API works **only on ChromeOS**.

<br />

<br />

## Description

The `chrome.virtualKeyboard` API is a kiosk only API used to configure virtual keyboard layout and behavior in kiosk sessions.

<br />

<br />

## Permissions

`virtualKeyboard`  

<br />

<br />

## Availability

Chrome 58+ ChromeOS only

<br />

<br />

<br />

## Types

### FeatureRestrictions

#### Properties

- autoCompleteEnabled boolean optional

  Whether virtual keyboards can provide auto-complete.
- autoCorrectEnabled boolean optional

  Whether virtual keyboards can provide auto-correct.
- handwritingEnabled boolean optional

  Whether virtual keyboards can provide input via handwriting recognition.
- spellCheckEnabled boolean optional

  Whether virtual keyboards can provide spell-check.
- voiceInputEnabled boolean optional

  Whether virtual keyboards can provide voice input.

## Methods

### restrictFeatures()

Promise

```typescript
chrome.virtualKeyboard.restrictFeatures(
  restrictions: FeatureRestrictions,
  callback?: function,
): Promise<https://developer.chrome.com/docs/apps/reference/virtualKeyboard#type-FeatureRestrictions>
```

Sets restrictions on features provided by the virtual keyboard.

#### Parameters

- restrictions [FeatureRestrictions](https://developer.chrome.com/docs/apps/reference/virtualKeyboard#type-FeatureRestrictions)

  the preferences to enabled/disabled virtual keyboard features.
- callback function optional


  The `callback` parameter looks like:

  ```typescript
  (update: FeatureRestrictions) => void
  ```

  <br />

  - update [FeatureRestrictions](https://developer.chrome.com/docs/apps/reference/virtualKeyboard#type-FeatureRestrictions)
    Chrome 63+

#### Returns

- Promise\<[FeatureRestrictions](https://developer.chrome.com/docs/apps/reference/virtualKeyboard#type-FeatureRestrictions)\>
  Chrome 96+


  Promises are only supported for Manifest V3 and later, other platforms need to use callbacks.

<br />