-api-id | -api-type |
---|---|
T:Windows.Devices.Input.KeyboardCapabilities |
winrt class |
Provides the ability to determine the capabilities of any connected hardware keyboards.
The Device Capabilities Sample demonstrates how to detect the presence of input devices and retrieve the capabilities and attributes of each device.
The following code shows how to create an instance of this class and use it to determine if a keyboard is present.
function getKeyboardCapabilities() {
var keyboardCapabilities = new Windows.Devices.Input.KeyboardCapabilities();
id("keyboardPresent").innerHTML = keyboardCapabilities.keyboardPresent;
}