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?);
    }
} 
  •   @gcaughey thats cool; just whole microsoft should do :)
  •   @ClintRutkas is the stand up recorded (and will it be published)?
  •   Windows Community Standup about to begin! https://t.co/AKgKGdLFqB #windev #uwp
  •   @ClintRutkas @ch9 wished could join! too bad got some important other community activity
  •   @VideolandOnline wanneer komen jullie naar xbox?
  •   RT @VSTS: Beautiful new Velocity Widget available as part of the #VSTS Analytics Extensions. https://t.co/Mc2YSDZuGF https://t.co/9nMR1jn…
  •   RT @ClintRutkas: Join us on July 26th, 2017 at 9:30am PST for Community Standup with Kevin Gallo! https://t.co/b8Be0viP3B
  •   @dvroegop congrats!
  •   @MicrosoftTeams @danieltharris When making the awesome uwp app also available for desktop? Currebt one for desktop is a pain
  •   @tomverhoeff na that are my personalistion settings.. :)