Skip to content

MouseEvent pressure property

May 5, 2008

I added a new attribute on the MouseEvent to expose the amount of pressure is being applied to a touch screen.

The video shows me pressing a pen then my finger on the touch screen.  The value on screen is a number between 0 and 1; zero indicating no pressure and one indicating alot of pressure.  Sorry about the quality.

You could imagine building a web painting application that varies the thickness of a line based on how hard you press, or the Fennec browser app could vary the speed of the scroll based on how hard the user presses on the scroll area.

Before this makes it into the project, there are a bunch of unanswered questions in the bug.  Mostly questions relate to how we expose this property in the DOM, and how to gather this pressure information from the platforms.

From → Uncategorized

7 Comments
  1. Or it could be used to activate contextual menu (right mouse bottom menu)

  2. Hans permalink

    Nice :) A pressure sensitive paint program is always a good start. With pressure sensitivity in the browser, you can do signature verification based on a timeseries (x,y,p) in the browser, instead of an external driver. Not sure whether that is an advantage. However, maybe think the consequences of mobile browsers, touchscreens and pressure authentication passwords handwriting recognition pressure sensitive Captcha etc.

    Regarding your questions in the bug – Typically, 64 pressure levels (int) are good enough for verification. The limit is typically what your sensor can support (if the touchscreen supports 16 levels you don’t need a float :) .

  3. Aleksej permalink

    Hans: cheap graphics tablets support 512 or 1024 levels.

  4. Venky permalink

    Cool! For fennec we could also do panning with light dragging, and zooming with heavy dragging :)

  5. Thank you for good information~~*

    Please comeback to visit my blog too :http://touchscreen-system.blogspot.com/

    I’m sorry , If you think this is spam. but may i thank you again.

    Bye

Trackbacks & Pingbacks

  1. MouseEvent Pressure Property on the Mobile Platform « OSS Blog
  2. Mouse Pressure Support in Mozilla « DougT’s Blog

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.