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?);
    }
} 
  •   @sandeepchads i needed this last week!
  •   @hrist0ph sorry very busy with work at the moment; but working on a rewrite based on the new sdk but not going as fast as i want
  •   @surface thanks but says i am up to date and want all the goodness of 19H1 on my Surface Go
  •   how often i have to press check for updates to force the may update on my surface go 🐱‍👓? #windowsinsiders
  •   @JenMsft Already available to surface go?
  •   RT @windowsblog: Announcing UI Tests in CI/CD for Desktop App Developers https://t.co/3DK2wzAGlX
  •   RT @mrlacey: I get excited about the simplest (obscure?) things sometimes. Yay, XmlnsDefinitionAttribute is coming to .NET Core 3.0, which…
  •   Why does @slack starts faster on my lightweight mobile device then on my heavy powered Core i7 Laptop?
  •   RT @alexmullans: Azure Artifacts is now priced per GB stored 🥳. No more buying and assigning licenses. Start at https://t.co/JAn6daobLV. F…
  •   @LocalJoost i am the creator :) #sorry