Recent

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?);
    }
} 
  •   @VanMoof after ordering is it possible to somewhere look up status with eta?
  •   cute how @MicrosoftTeams restart due a glitch when you close the app... makes me wonder what they think the glitch… https://t.co/2TwilGiy1F
  •   Goodie incoming :)
  •   @danhellem @AzureDevOps awesome! :)
  •   @sandeepchads @AzureDevOps it's not there anymore; the morning i had the feature had a banner in the top of the page that had a button "try"
  •   @sandeepchads @AzureDevOps I had the feature yesterday morning on my environment and in the evening it was gone again 😭
  •   @markscholman @windowsdev Thanks! Jij ook!
  •   Another year @windowsdev MVP #MVPBuzz https://t.co/blu1TMBO0E
  •   RT @kevintgallo: Check it out https://t.co/F9exR1pQMx
  •   RT @stanzillaz: The new Windows Terminal is now on the Store https://t.co/n8rjsg19dv #WindowsInsiders