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?);
    }
} 
  •   @hermitdave nice :)
  •   argghhhh I move to #GoogleDrive. @onedrive is broken
  •   @Outlook edge & IE it happend and also after clearing cache
  •   @JenMsft its tempting to install my main machine love that can hide all app list in start
  •   @donasarkar that bluelight filter also in mobile now?
  •   RT @donasarkar: #WindowsInsiders: we are releasing a shaken AND stirred 15007 build today to Fast Ring for PC + Mobile. https://t.co/9eMSmH…
  •   @donasarkar @Billkar44 15007? :)
  •   @tfsbuck would be nice if can do myself; now need to hope everyone is going to do; since #vs2017 seems to get slow /w many accounts
  •   @Outlook #owa is broken; says 2 unread email; but all mails are read https://t.co/pNfhFj8kRM
  •   @tfsbuck i am member of 7 tenants; just use 3. in those other 4 cant make change in the user tab (lacking permissions). need contact owner?