Keyboard​Capabilities Keyboard​Capabilities Keyboard​Capabilities Class

Definition

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

public sealed class KeyboardCapabilities : IKeyboardCapabilitiespublic sealed class KeyboardCapabilities : IKeyboardCapabilitiesPublic NotInheritable Class KeyboardCapabilities Implements IKeyboardCapabilities
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

KeyboardCapabilities() KeyboardCapabilities() KeyboardCapabilities()

Initializes a new instance of the KeyboardCapabilities class.

public KeyboardCapabilities()public KeyboardCapabilities()Public Sub New()
Attributes
See Also

Properties

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
Value
int int int

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

Attributes
See Also

See Also