--- title: Navigator.keyboard slug: Web/API/Navigator/keyboard translation_of: Web/API/Navigator/keyboard ---
The keyboard
read-only property of the {{domxref("navigator")}} interface returns a {{domxref('Keyboard')}} 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
一个 {{domxref('Keyboard')}} 对象.
Specification | Status | Comment |
---|---|---|
{{SpecName('Keyboard Map','#navigator-interface','keyboard')}} | {{Spec2('Keyboard Map')}} | Initial definition. |
{{Compat("api.navigator.keyboard")}}