Skip to main content
KeyboardCapabilities.KeyboardPresent | keyboardPresent property

Applies to Windows and Windows Phone

Gets a value that indicates whether a hardware keyboard is detected.

Syntax


var keyboardPresent = keyboardCapabilities.keyboardPresent;

public int KeyboardPresent { get; }

Public ReadOnly Property KeyboardPresent As Integer

public:
property int KeyboardPresent { 
   int get();
}

Property value

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

The number of hardware keyboards detected. Typically 0 or 1.

Examples

The following code shows how to use this method.


    function getKeyboardCapabilities() {
        var keyboardCapabilities = new Windows.Devices.Input.KeyboardCapabilities();
        id("keyboardPresent").innerHTML = keyboardCapabilities.KeyboardPresent;
    }

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Input
Windows::Devices::Input [C++]

Metadata

Windows.winmd

See also

KeyboardCapabilities
Quickstarts
Quickstart: Identifying input devices