Share via


KeyRoutedEventArgs.DeviceId Property

Definition

Gets a unique ID for the input device that generated this key event (not supported for all input devices).

public:
 property Platform::String ^ DeviceId { Platform::String ^ get(); };
winrt::hstring DeviceId();
public string DeviceId { get; }
var string = keyRoutedEventArgs.deviceId;
Public ReadOnly Property DeviceId As String

Property Value

String

Platform::String

winrt::hstring

A unique identifier for the input device associated with the key event, or an empty string for an unsupported device. The same device can be assigned a different ID each time it is connected.

Remarks

DeviceId can be used to differentiate between all connected devices that can generate key events.

Applies to