KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities KeyboardCapabilities Class

Definition

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

public : sealed class KeyboardCapabilities : IKeyboardCapabilities
public sealed class KeyboardCapabilities : IKeyboardCapabilities
Public NotInheritable Class KeyboardCapabilities Implements IKeyboardCapabilities
var keyboardCapabilities = new keyboardCapabilities();
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() KeyboardCapabilities()

Initializes a new instance of the KeyboardCapabilities class.

public : KeyboardCapabilities()
public KeyboardCapabilities()
Public Sub New()
var keyboardCapabilities = new keyboardCapabilities();
See Also

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
var int = keyboardCapabilities.keyboardPresent;
Value
int int int int

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

See Also

See Also