Navigator.keyboard

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

The keyboard read-only property of the navigator interface returns a Keyboard (en-US) object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.

语法

var keyboard = navigator.keyboard

Value

一个 Keyboard (en-US) 对象。

规范

Specification
Keyboard Lock
# h-navigator-keyboard

浏览器兼容性

BCD tables only load in the browser