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?);
    }
} 
  •   @tfsbuck tnx
  •   RT @KayceeSue: More debugging secrets available now! #SuperChargeYourDebugging #ImNotKeepingSecretsAnyMore #HacksOrTactics https://t.co/5DI…
  •   RT @MSFTnews: Windows Developer Day coming Oct. 10: Check out the list of live stream viewing parties worldwide https://t.co/MN7TBqfXoR
  •   @VSTS My extensions are ready for it!
  •   RT @LocalJoost: Windows Fall Creators Update Viewing Party https://t.co/HEGyD30rQB
  •   @tfsbuck any idea how to change this image? https://t.co/JsYG4okVbl
  •   @windowsdev community standup about to begin! https://t.co/AKgKGdLFqB
  •   @LocalJoost screen replaced of the entire device?
  •   @skprufo windows 10s only support apps from the windows store
  •   @skprufo how i get the teams app on my surface laptop with win10s?