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 @kevintgallo: Check it out https://t.co/F9exR1pQMx
  •   RT @stanzillaz: The new Windows Terminal is now on the Store https://t.co/n8rjsg19dv #WindowsInsiders
  •   @tfsbuck maybe not that clear as i was using my phone. in the release note notification I still see the annoucement… https://t.co/tx8DDm36q8
  •   @hermitdave @JenMsft Notifications In your phone, feature in that app
  •   @hermitdave @JenMsft same for apps, surface book has notifications while surface go hasn't for example
  •   @tfsbuck Rollout sprint 152 complete? in notification I still see thee notice of the build content, while other org… https://t.co/SujHBEYP5v
  •   @JenMsft when doing stage rollout, happens it per device or per user? Feels per device, giving such weird experienc… https://t.co/WZQbI8oYUQ
  •   @JenMsft can i already remove the old edge?
  •   @mahoekst ohh absolutely.. refered appinsights because the briljant visualizations and great tracebility between di… https://t.co/SXctg12saH
  •   @mahoekst use appinsights?