KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities Class

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

Syntax

Declaration

public sealed class KeyboardCapabilitiespublic sealed class KeyboardCapabilitiesPublic NotInheritable Class KeyboardCapabilities

Remarks

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;
}

Constructors summary

Initializes a new instance of the @Windows.Devices.Input.KeyboardCapabilities.#ctor class.

Properties summary

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

Constructors

  • KeyboardCapabilities()
    KeyboardCapabilities()
    KeyboardCapabilities()
    KeyboardCapabilities()

    Initializes a new instance of the @Windows.Devices.Input.KeyboardCapabilities.#ctor class.

    public KeyboardCapabilities()public KeyboardCapabilities()Public Function KeyboardCapabilities() As

Properties

  • KeyboardPresent
    KeyboardPresent
    KeyboardPresent
    KeyboardPresent

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

    public int KeyboardPresent { get; }public int KeyboardPresent { get; }Public ReadOnly Property KeyboardPresent As int

    Property Value

    • int
      int
      int
      int

      Returns 1 if a device identifying itself as a keyboard is detected. Otherwise, returns 0.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Devices.Input.dll