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?);
    }
} 
  •   RT @ClintRutkas: Start developing on Windows 10 May 2019 Update today https://t.co/bm2AEhjJ93
  •   @martinwoodward @DivineOps @AzureDevOps Remote?
  •   @JenMsft I just upgraded my daily driver to may update (joined release preview) and since that getting error on sta… https://t.co/XVXSxT301t
  •   @youhanaNaseim @kevbry @tfsbuck You get them as soon back behind pc, including the nuances and workaround we use (which works great)
  •   @kevbry @youhanaNaseim @tfsbuck Same here
  •   @maryjofoley fancy :) didnt even dare to try to start the installer
  •   @kylealden How I install it on device in s mode? (surface go)
  •   @christianbute @JenMsft @MicrosoftEdge Its in s mode...?
  •   @JenMsft @MicrosoftEdge and how install it on my #SurfaceGo
  •   @MSEdgeDev why not using MSIX?