Closed
Bug 531466
Opened 15 years ago
Closed 2 years ago
Tilt and device type information would be nice in mouse events
Categories
(Core :: DOM: UI Events & Focus Handling, enhancement)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: ilmari.heikkinen, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(2 files, 4 obsolete files)
14.04 KB,
patch
|
Details | Diff | Splinter Review | |
2.33 KB,
text/html
|
Details |
Drawing tablets pens can report pen tilt and the current pen's type (pen/eraser/cursor). There are also Wacom airbrush styluses that have an extra wheel axis for controlling brush parameters. Having these exposed in mouse events makes it possible to write user-friendly drawing programs in JavaScript. I wrote an implementation by following the mozPressure path and added mozTiltX, mozTiltY, mozWheel and mozDeviceType {mouse=0,pen=1,eraser=2,cursor=3} to DOMNSMouseEvent. The current implementation only has hooks for GTK2. To test the patch you need Linux, a Wacom tablet [that is working in e.g. GIMP] - preferably Intuos for the tilt support, and the XInput-enabling patch from https://bugzilla.mozilla.org/show_bug.cgi?id=531320
Reporter | ||
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
So what does the "wheel" mean exactly in this context. The problem is that wheel has other meaning in DOM Events (mousewheel). I wonder if the similar terminology as what InkML has could be used here.
Reporter | ||
Comment 3•15 years ago
|
||
The "wheel" is apparently a term only used in Linux Wacom drivers. Looked at the Linux, Windows and Mac tablet event documentation, and it's a bit of a mess. On Linux http://linuxwacom.sourceforge.net/index.php/appdev : XTILT = pen x-tilt, puck mouse rotation, tablet left menu strip YTILT = pen y-tilt, puck mouse wheel position, tablet right menu strip WHEEL = airbrush control wheel position, art pen rotation, bamboo touch ring On OS X : - http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/EventOverview/HandlingTabletEvents/HandlingTabletEvents.html - http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/Reference/Reference.html tilt = NSPoint with x-tilt and y-tilt puck mouse wheel = absoluteZ rotation = rotation airbrush wheel = tangentialPressure [-1.0, 1.0] On Windows: - http://www.wacomeng.com/devsupport/ibmpc/gddevpc.html rotation = pkOrientation.orTwist [0, 3599] mouse wheel = pkZ [-1023, 1023] airbrush wheel = pkTangentPressure [0, 1023] The InkML spec uses rotation for rotation (well, yes). So, yes, wheel would be better renamed to rotation. The overlap in Linux event semantics is unfortunate. So on Linux, if device type is cursor, map XTILT and YTILT to other event fields. That would replace mozWheel with mozRotation, which would track puck rotation, art pen rotation and airbrush wheel. To keep the mouse wheel value, it could be mapped to Wheel or TiltZ or whatever.
Reporter | ||
Comment 4•15 years ago
|
||
This patch uses mozRotation for WHEEL events and remaps the puck mouse XTILT(=rotation) to mozRotation and YTILT(=shuttle wheel position) to mozTiltZ. Also uses tiltx/y/z instead of x/y/ztilt as C++ property names.
Attachment #414883 -
Attachment is obsolete: true
Attachment #414884 -
Attachment is obsolete: true
Reporter | ||
Comment 5•15 years ago
|
||
Reporter | ||
Comment 6•15 years ago
|
||
bugfix for messed up the puck rotation normalization This patch uses mozRotation for WHEEL events and remaps the puck mouse XTILT(=rotation) to mozRotation and YTILT(=shuttle wheel position) to mozTiltZ. Also uses tiltx/y/z instead of x/y/ztilt as C++ property names.
Attachment #414927 -
Attachment is obsolete: true
Attachment #414928 -
Attachment is obsolete: true
Reporter | ||
Comment 7•15 years ago
|
||
Comment 8•10 years ago
|
||
Would this be a strong fingerprinting tool?
Assignee | ||
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
Updated•2 years ago
|
Severity: normal → S3
Comment 9•2 years ago
|
||
I think we could close this, if you could get these information via pointer events.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•