Pen identity in UWP

When you are building apps for the Surface Hub you can use a real cool inking feature. The screen is already amazing with 84" and the pen support. But the pens also have an identity. This is a number and when you match this up with a credential you can do awesome things.

To get the pen identity you need few simple lines of code. I build an extension method for that:

public static class PointerPointPropertiesExtensions
    private const uint WirelessIdUsagePage = 0x0D;
    private const uint WirelessIdUsage = 0x5B;

    public static int? GetPenId(this PointerPointProperties pointerProperties)
        var hasId = pointerProperties.HasUsage(WirelessIdUsagePage, WirelessIdUsage);
        return hasId ? pointerProperties.GetUsageValue(WirelessIdUsagePage, WirelessIdUsage) : default(int?);
  •   @theothernt where did you read that?
  •   forgot my laptop charger.. lucky the @vsteam code editor is not that bad from a phone with continuuum
  •   @tfsbuck special reason there is no client for releases here:
  •   published my new #vsts extesion: Activity Feed; up to date in glance:
  •   want to test my activityfeed widget? let me know! @VSTeam #vsts
  •   @Clarkezone @mtaulty what has background audio to do with visuals? waveforms?
  •   making much progress on my first widget. An activity feed for #VSTS Soon in the marketplace i hope
  •   @tfsbuck how i report bugs in this api? ? using client.getUpdates( gives invalid revisedDate
  •   @tfsbuck we moved from TFVC to GIT ; is it possible to remove the tfvc repository? search shows now everything double?
  •   @LocalJoost met duits holografisch toetsenbord toch ;)