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?);
    }
} 
  •   @TwitterSupport great move!
  •   Gave my #ActivityFeed extension for @VSTS some valentine's love by giving it a fresh new look. Get it here… https://t.co/RiTSWr4mQL
  •   @DrGigabit love this too: https://t.co/G3YsSJzafK There is a mismatch between what science knows and what business does
  •   @aaronbjork anything in pipeline to work more with target dates. or at least give something that can be disuccesed witih stakeholders?
  •   @aaronbjork we are using the kanban boards and never the sprints; anymore; this makes delivery plans kind of useless. (1/2)
  •   3 of the @vsts extensions i was involved in now on the homepage of the marketplace https://t.co/mM9h0F8ZVu
  •   @JenMsft w00t mouse delays fixed?
  •   @agent766 drop me an email and will help you dave@familie-smits.com
  •   @willsmythe and for widgets you can include platform styling. can hubs do that ? cant find method for it neither (get same headers etc)
  •   @willsmythe for my Project Teams extension want to make it possible to favorite teams. not really find the right control in that library