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?);
    }
} 
  •   crap.. having a call but pc started to do a system update....
  •   @JenMsft Time settings in the settings app can use sone tlc
  •   wow wat een reclame van @Bavaria op @YouTube ; take away? idioten drinken @Bavaria
  •   @densto can we change the "report build status" in yaml?
  •   @densto tomorrow will make sure the coverage file is put in the build output and see if there is more information i… https://t.co/eeEBSh2Y1W
  •   @densto tests are run and test results are published. just code coverage seems to be randomly missing. (1/2)
  •   @densto no error; just no results; but seems its something different.. had now no reuslts even with windows build first..
  •   @sandeepchads In wiki
  •   @densto no it doesnt.. the linux build is just dotnet commands while the windows build is a visual studio build. it was suprsing me too
  •   @densto can i force to let windows go first?