MouseEvent pressure property

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.

[youtube=http://www.youtube.com/watch?v=m_nwqj0rlb4]

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.

This entry was posted in mozilla and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

5 Comments

  1. Posted May 5, 2008 at 11:40 pm | Permalink

    Or it could be used to activate contextual menu (right mouse bottom menu)

  2. Hans
    Posted May 6, 2008 at 1:11 pm | 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
    Posted May 7, 2008 at 2:50 am | Permalink

    Hans: cheap graphics tablets support 512 or 1024 levels.

  4. Venky
    Posted May 7, 2008 at 7:53 am | Permalink

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

  5. Posted May 14, 2008 at 10:56 pm | Permalink

    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

2 Trackbacks

  1. [...] MouseEvent pressure property « DougT’s Blog [...]

  2. By Mouse Pressure Support in Mozilla « DougT’s Blog on December 10, 2008 at 9:59 pm

    [...] Pressure Support in Mozilla By dougt A few months back, I prototyped a device feature that would allow the MouseEvent to also carry an attribute of how [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>