Stylus Input Libraries Available

Hi there,
I'm wondering if there are any libraries that can help with capturing data from a stylus, in my case a Surface Pen. Input data would include pressure, angle, using the "eraser" side, and clicking with the buttons.

Thanks!
Raen