Can I recognize (pen tablet) pen pressure in Javascript?

Is there a way to recognize pen pressure using javascript. Preferably, I do not want to use Flash and try to do it as pure JS.

EDIT: ok, I realized this is possible for Wacom tablets, as they come with software that can work with their javascript api to make this possible ( demos ). But this is not good for people with timesheets or any other brand ... So nothing good happens.

Does any body know how to do this in C #, if not JS?

+7
source share
5 answers

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

+15
source

Microsoft implemented something called Pointer Events in IE 11. This allows you to access pressure properties along with things like pen tilt and contact geometry size.

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

+10
source

No, It is Immpossible. Maybe not even with Flash.

+1
source

You can only do this in the Native app. Javascript does not have access to pen pressure information

0
source

Javascript as a programming language in itself does not have more features or the inability to read data like any other language.

Language is not important. It is important that the APIs are accessible to you from the language.

Javascript can be run in several different environments, some of which may have access to the API for such equipment. However, most Javascript runs in a web browser environment, and this is clear what you mean.

A number of APIs are provided in a web browser environment. The most obvious is the DOM, which gives you the ability to manipulate the page, etc. There are other APIs available in the browser. For example, the geolocation API.

These are all standard APIs that have been defined by W3C (or in some cases are in the process of defining W3C), which means that all browsers that support them should make them work the same.

Unfortunately, for you there is no standard API for working with push bars, so the direct answer to your question is no, this is not possible.

Whether there will be one available in the future remains to be seen, but I have doubts.

There is one way you can do this: ActiveX.

ActiveX is an API provided by Microsoft in older versions of IE. This basically provides a way to access almost any Windows DLL from a browser.

Since the manual push device driver for Windows will be provided as a DLL, this means that you should theoretically have access to it in a browser using an ActiveX control. So yes, you could program it using Javascript.

The bad news is that this is not what I would recommend. ActiveX, as a browser-based technology, has long since been abandoned due to the huge security holes it caused. I don’t think that the latest versions of IE even support it (I hope not, anyway), which means that you will have to use older versions of IE (and only IE - no other browser has ever supported it) to run your code. Not ideal.

0
source

All Articles