Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I recognise (graphic tablet) Pen Pressure in Javascript?

Is there any way to recognise pen pressure using javascript. Preferably I don't want to make any use of Flash and try get this done as pure JS.

EDIT: okay I realised that it is kind of possible for Wacom tablets as they come with software that can work with their javascript api to make it possible (demos). But it's no good for people with Trust tablets or any other brand... So no good really.

Any body know how to do it in C# if not JS?

like image 335
user1270235 Avatar asked May 08 '12 22:05

user1270235


2 Answers

Yes - if the user has a Wacom tablet installed, then their browser will have a plugin for it that you can access. http://www.wacomeng.com/web/index.html

edit from author: I wrote this a very long time ago. Please see the comments below

like image 154
aehlke Avatar answered Oct 19 '22 15:10

aehlke


Microsoft implemented something called Pointer Events in IE 11. It allows you to access pressure property along with stuff like pen tilt and size of contact geometry.

So far it only works on IE11 (and IE10 with vendor prefixes) but there is a W3C candidate recommendation so maybe it will be standard in future.

like image 29
czeslaaw Avatar answered Oct 19 '22 15:10

czeslaaw