title: HTML5/Javascript - Is it possible to get the absolute coordinates of a touch event on a Macbook Trackpad in the browser?
body: <p>I would like to write something in the browser which records gestures on the trackpad.  </p>
  
  <p>Since I wanted to be able to track all motion without having to worry about the pointer leaving the window, I first researched this problem and used the <a href="http://mdn.github.io/pointer-lock-demo/" rel="noreferrer">MDN Pointer Lock API demo</a> as a starting point.  </p>
  
  <p>But I notice when using this demo on a MacBook that if I lift my finger and start a new drag elsewhere on the trackpad, it ignores the distance my finger traveled in the air, it only counts the motion done while my finger is touching the trackpad. This is consistent with the way that the trackpad is used to move the mouse pointer in the operating system in general.</p>
  
  <p>But for my specific application, I want to have the <strong>absolute</strong> x and y of my finger on the trackpad.  Would it be possible to build a variant of the demo linked above where the red dot corresponds to the absolute position of your finger?  e.g., if you lifted your finger and then put it down in the upper left, the red dot would always jump to the upper left of the canvas?</p>
  
  <p>I'm aware of the javascript <a href="https://developer.mozilla.org/en-US/docs/Web/API/Touch_events" rel="noreferrer">Touch Events API</a>, which gives absolute coordinates when used on a tablet, but the <a href="https://mdn.mozillademos.org/en-US/docs/Web/API/Touch_events$samples/Example?revision=779705" rel="noreferrer">demo</a> does not register any trackpad input when run on the MacBook under Firefox (v36) or Chrome (v41).</p>
  
  <p>I have also read that it's possible to enable touch emulation in Chrome, though I could not find the checkbox to do that under my version (perhaps only special developer builds have this) and from reading about it, it seems like it's more of a mouse-to-touch translation so I'm doubtful that that emulation would have specific support for trackpads.</p>
  
  <p>Is there any way that getting the absolute x,y coordinates of a touch event on a MacBook trackpad is possible via HTML/Javascript?</p>