KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities Class


Supports the ability to determine the capabilities of any connected hardware keyboards.

public : sealed class KeyboardCapabilities : IKeyboardCapabilities
struct winrt::Windows::Devices::Input::KeyboardCapabilities : IKeyboardCapabilities
public sealed class KeyboardCapabilities : IKeyboardCapabilities
Public NotInheritable Class KeyboardCapabilities Implements IKeyboardCapabilities
var keyboardCapabilities = new keyboardCapabilities();
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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;


KeyboardCapabilities() KeyboardCapabilities() KeyboardCapabilities() KeyboardCapabilities() KeyboardCapabilities()

Initializes a new instance of the KeyboardCapabilities class.


KeyboardPresent KeyboardPresent KeyboardPresent KeyboardPresent KeyboardPresent

Gets a value that indicates whether a device identifying itself as a keyboard is detected.

See Also