PointerDevice PointerDevice PointerDevice PointerDevice Class


Supports the ability to identify the connected pointer devices and determine their capabilities.

public : sealed class PointerDevice : IPointerDevice, IPointerDevice2
public sealed class PointerDevice : IPointerDevice, IPointerDevice2
Public NotInheritable Class PointerDevice Implements IPointerDevice, IPointerDevice2
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


The following code shows how to use PointerDevice.

function getPointerDevicesAndAttributes() {
    var pointerDevices = Windows.Devices.Input.PointerDevice.GetPointerDevices();
    var htmlWrite = "";
    for (i = 0; i < pointerDevices.Size; i++)  {
         htmlWrite += "<tr><td>(" + i + ") Pointer Device Type</td><td>";
         htmlWrite += getPointerDeviceType(pointerDevices[i].PointerDeviceType) + "</td></tr>";
         htmlWrite += "<tr><td>(" + i + ") Is External</td><td>" + pointerDevices[i].IsExternal + "</td></tr>";
         htmlWrite += "<tr><td>(" + i + ") Max Contacts</td><td>" + pointerDevices[i].MaxContacts + "</td></tr>";
         htmlWrite += "<tr><td>(" + i + ") Physical Device Rect</td><td>" +
             pointerDevices[i].PhysicalDeviceRect.X + "," +
             pointerDevices[i].PhysicalDeviceRect.Y + "," +
             pointerDevices[i].PhysicalDeviceRect.Width + "," +
             pointerDevices[i].PhysicalDeviceRect.Height + "</td></tr>";
         htmlWrite += "<tr><td>(" + i + ") Screen Rect</td><td>" +
             pointerDevices[i].ScreenRect.X + "," +
             pointerDevices[i].ScreenRect.Y + "," +
             pointerDevices[i].ScreenRect.Width + "," +
             pointerDevices[i].ScreenRect.Height + "</td></tr>";
    id("pointerDevices").innerHTML = htmlWrite;


The values returned by the properties discussed here are based on the total number of pointer devices connected: Boolean properties return true if one device supports a specific capability and numeric properties return the maximum value exposed by all devices.

The Device Capabilities Sample demonstrates how to detect the presence of input devices and retrieve the capabilities and attributes of each device.


: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).


IsIntegrated IsIntegrated IsIntegrated IsIntegrated

Gets a value indicating whether the pointer device is an integrated device. For example, a video display with an integrated touch digitizer compared to an external pen/stylus digitizer.

public : Platform::Boolean IsIntegrated { get; }
public bool IsIntegrated { get; }
Public ReadOnly Property IsIntegrated As bool
var bool = pointerDevice.isIntegrated;
Platform::Boolean bool bool bool

True if the pointer device is integrated; otherwise, false.

See Also

MaxContacts MaxContacts MaxContacts MaxContacts

Gets a value indicating the maximum number of contacts supported by the input device.

public : unsigned int MaxContacts { get; }
public uint MaxContacts { get; }
Public ReadOnly Property MaxContacts As uint
var uint = pointerDevice.maxContacts;
unsigned int uint uint uint

The number of contacts.


This property typically returns a value of 5 or more for touch devices and 1 for mouse and pen/stylus devices.

See Also

MaxPointersWithZDistance MaxPointersWithZDistance MaxPointersWithZDistance MaxPointersWithZDistance

Gets the maximum number of hover contacts supported by the input device.

public : unsigned int MaxPointersWithZDistance { get; }
public uint MaxPointersWithZDistance { get; }
Public ReadOnly Property MaxPointersWithZDistance As uint
var uint = pointerDevice.maxPointersWithZDistance;
unsigned int uint uint uint

The default value is 0.


MaxPointersWithZDistance might not be equal to MaxContacts.

PhysicalDeviceRect PhysicalDeviceRect PhysicalDeviceRect PhysicalDeviceRect

Gets the coordinates of the bounding rectangle supported by the input device.

public : Rect PhysicalDeviceRect { get; }
public Rect PhysicalDeviceRect { get; }
Public ReadOnly Property PhysicalDeviceRect As Rect
var rect = pointerDevice.physicalDeviceRect;
Rect Rect Rect Rect

The bounding rectangle at 96 dots per inch (dpi).

See Also

PointerDeviceType PointerDeviceType PointerDeviceType PointerDeviceType

Gets the pointer device type.

public : PointerDeviceType PointerDeviceType { get; }
public PointerDeviceType PointerDeviceType { get; }
Public ReadOnly Property PointerDeviceType As PointerDeviceType
var pointerDeviceType = pointerDevice.pointerDeviceType;
See Also

ScreenRect ScreenRect ScreenRect ScreenRect

Gets the screen coordinates that are mapped to the bounding rectangle supported by the input device.

public : Rect ScreenRect { get; }
public Rect ScreenRect { get; }
Public ReadOnly Property ScreenRect As Rect
var rect = pointerDevice.screenRect;
Rect Rect Rect Rect

The screen coordinates, in device-independent pixel (DIP).

See Also

SupportedUsages SupportedUsages SupportedUsages SupportedUsages

Gets a collection containing the supported pointer device usages.

public : IVectorView<PointerDeviceUsage> SupportedUsages { get; }
public IReadOnlyList<PointerDeviceUsage> SupportedUsages { get; }
Public ReadOnly Property SupportedUsages As IReadOnlyList<PointerDeviceUsage>
var iReadOnlyList = pointerDevice.supportedUsages;
IVectorView<PointerDeviceUsage> IReadOnlyList<PointerDeviceUsage> IReadOnlyList<PointerDeviceUsage> IReadOnlyList<PointerDeviceUsage>

A collection containing the supported pointer device usages.


A Human Interface Device (HID) usage describes what a Human Interface Device (HID)-compliant control is measuring or reporting and can also indicate the control's intended use. A specific control usage is defined by its usage page, a usage ID, a name, and a description. For more info, see Device Class Definition for .


The core of the Microsoft interactive input device architecture is based on the Universal Serial Bus (USB) standard Device Class Definition for Human Interface Device (HID), which is defined by the Implementers Forum, Inc.

The Universal Serial Bus (USB) Human Interface Device (HID) standard defines the configuration and communication protocols for Human Interface Device (HID), such as keyboards, mouse devices, joysticks, and virtual reality devices, that humans use to enter data directly into a computer. (For detailed information about the USB HID standard, see the USB Implementers Forum website.)

Although the core of the Windows input architecture is based on the Universal Serial Bus (USB) Human Interface Device (HID) standard, the architecture is not limited to Universal Serial Bus (USB) devices. The input architecture also supports serial port devices, i8042 port devices, and proprietary input devices.

See Also


GetPointerDevice(UInt32) GetPointerDevice(UInt32) GetPointerDevice(UInt32) GetPointerDevice(UInt32)

Gets information about the pointer device associated with the specified input pointer ID.

public : static PointerDevice GetPointerDevice(unsigned int pointerId)
public static PointerDevice GetPointerDevice(UInt32 pointerId)
Public Static Function GetPointerDevice(pointerId As UInt32) As PointerDevice
var pointerDevice = Windows.Devices.Input.PointerDevice.getPointerDevice(pointerId);
unsigned int UInt32 UInt32 UInt32

The ID of the pointer input.


The PointerDevice object that represents the associated pointer device.


GetPointerDevice is a static method.

The input pointer specified by pointerId must identify an active input.

See Also

GetPointerDevices() GetPointerDevices() GetPointerDevices() GetPointerDevices()

Gets information about the pointer devices attached to the system.

public : static IVectorView<PointerDevice> GetPointerDevices()
public static IReadOnlyList<PointerDevice> GetPointerDevices()
Public Static Function GetPointerDevices() As IReadOnlyList<PointerDevice>( Of PointerDevice )
var iVectorView = Windows.Devices.Input.PointerDevice.getPointerDevices();
IVectorView<PointerDevice> IReadOnlyList<PointerDevice> IReadOnlyList<PointerDevice> IReadOnlyList<PointerDevice>

The collection of PointerDevice objects that represent the pointer devices attached to the system.


GetPointerDevices is a static method.

See Also

See Also