New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed "pen contact" condition on button/buttons. #96
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,7 +211,7 @@ <h1>Examples</h1> | |
<h1>Glossary</h1> | ||
<dl> | ||
<dt><dfn>active buttons state</dfn></dt> | ||
<dd>The condition when a pointer has a non-zero value for the <code>buttons</code> property. For mouse, this is when the device has at least one button depressed. For touch, this is when there is physical contact with the digitizer. For pen, this is when the pen has physical contact with the digitizer.</dd> | ||
<dd>The condition when a pointer has a non-zero value for the <code>buttons</code> property. For mouse, this is when the device has at least one button depressed. For touch, this is when there is physical contact with the digitizer. For pen, this is when either the pen has physical contact with the digitizer, or at least one button is depressed while hovering.</dd> | ||
<dt><dfn>active pointer</dfn></dt> | ||
<dd>Any touch contact, pen stylus, mouse cursor, or other pointer that can produce events. If it is possible for a given pointer (identified by a unique <code>pointerId</code>) to produce additional events within the document, then that pointer is still considered active. Examples: | ||
<ul> | ||
|
@@ -348,12 +348,12 @@ <h3>The <code>button</code> property</h3> | |
<thead><tr><th>Device Button Changes</th><th><code>button</code></th></tr></thead> | ||
<tbody> | ||
<tr><td>Neither buttons nor touch/pen contact changed since last event</td><td>-1</td></tr> | ||
<tr><td>Left Mouse,<br>Touch Contact,<br>Pen contact (with no modifier buttons pressed)</td><td>0</td></tr> | ||
<tr><td>Left Mouse,<br>Touch Contact,<br>Pen contact</td><td>0</td></tr> | ||
<tr><td>Middle Mouse</td><td>1</td></tr> | ||
<tr><td>Right Mouse,<br>Pen contact with barrel button pressed</td><td>2</td></tr> | ||
<tr><td>Right Mouse,<br>Pen barrel button</td><td>2</td></tr> | ||
<tr><td>X1 (back) Mouse</td><td>3</td></tr> | ||
<tr><td>X2 (forward) Mouse</td><td>4</td></tr> | ||
<tr><td>Pen contact with eraser button pressed</td><td>5</td></tr> | ||
<tr><td>Pen eraser button</td><td>5</td></tr> | ||
</tbody> | ||
</table> | ||
<div class="note">During a mouse drag, the value of the <code>button</code> property in a <code>pointermove</code> event will be different from that in a <code>mousemove</code> event. For example, while moving the mouse with the right button pressed, the <code>pontermove</code> events will have the <code>button</code> value -1, but the <code>mousemove</code> events will have the <code>button</code> value 2.</div> | ||
|
@@ -364,13 +364,13 @@ <h3>The <code>buttons</code> property</h3> | |
<table class="simple"> | ||
<thead><tr><th>Current state of device buttons</th><th><code>buttons</code></th></tr></thead> | ||
<tbody> | ||
<tr><td><b>Mouse move with no buttons pressed</b></td><td>0</td></tr> | ||
<tr><td>Left Mouse,<br>Touch Contact,<br>Pen contact (with no modifier buttons pressed)</td><td>1</td></tr> | ||
<tr><td><b>Mouse moved with no buttons pressed</b>,<br> Pen moved while hovering with no buttons pressed</td><td>0</td></tr> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Note that "moved" here includes the cases when the "footprint" of the pen is unmoved: e.g. a change in Do we need a note? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's fine to treat that as implied. |
||
<tr><td>Left Mouse,<br>Touch Contact,<br>Pen contact</td><td>1</td></tr> | ||
<tr><td>Middle Mouse</td><td>4</td></tr> | ||
<tr><td>Right Mouse,<br>Pen contact with barrel button pressed</td><td>2</td></tr> | ||
<tr><td>Right Mouse,<br>Pen barrel button</td><td>2</td></tr> | ||
<tr><td>X1 (back) Mouse</td><td>8</td></tr> | ||
<tr><td>X2 (forward) Mouse</td><td>16</td></tr> | ||
<tr><td>Pen contact with eraser button pressed</td><td>32</td></tr> | ||
<tr><td>Pen eraser button</td><td>32</td></tr> | ||
</tbody> | ||
</table> | ||
</section> | ||
|
@@ -538,7 +538,7 @@ <h3><dfn>The <code>pointerenter</code> event</dfn></h3> | |
</section> | ||
<section> | ||
<h3><dfn>The <code>pointerdown</code> event</dfn></h3> | ||
<p>A user agent MUST <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerdown</code> when a pointer enters the <a>active buttons state</a>. For mouse, this is when the device transitions from no buttons depressed to at least one button depressed. For touch, this is when physical contact is made with the <a>digitizer</a>. For pen, this is when the stylus makes physical contact with the digitizer.</p> | ||
<p>A user agent MUST <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerdown</code> when a pointer enters the <a>active buttons state</a>. For mouse, this is when the device transitions from no buttons depressed to at least one button depressed. For touch, this is when physical contact is made with the <a>digitizer</a>. For pen, this is when the pen either makes physical contact with the digitizer without any button depressed, or transitions from no buttons depressed to at least one button depressed while hovering.</p> | ||
<div class="note">For mouse (or other multi-button pointer devices), this means <code>pointerdown</code> and <code>pointerup</code> are not fired for all of the same circumstances as <code>mousedown</code> and <code>mouseup</code>. See <a href="#chorded-button-interactions">chorded buttons</a> for more information.</div> | ||
<p>For input <a href=#mapping-for-devices-that-do-not-support-hover>devices that do not support hover</a>, a user agent MUST also <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerover</code> followed by a pointer event named <code>pointerenter</code> prior to dispatching the <code>pointerdown</code> event.</p> | ||
<div class="note">Authors can prevent the firing of certain <a data-lt="compatibility mapping with mouse events">compatibility mouse events</a> by canceling the <code>pointerdown</code> event (if the <code>isPrimary</code> property is <code>true</code>). This sets the PREVENT MOUSE EVENT FLAG on the pointer. Note, however, that this does not prevent the <code>mouseover</code>, <code>mouseenter</code>, <code>mouseout</code>, or <code>mouseleave</code> events from firing.</div> | ||
|
@@ -549,7 +549,7 @@ <h3><dfn>The <code>pointermove</code> event</dfn></h3> | |
</section> | ||
<section> | ||
<h3><dfn>The <code>pointerup</code> event</dfn></h3> | ||
<p>A user agent MUST <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerup</code> when a pointer leaves the <a>active buttons state</a>. For mouse, this is when the device transitions from at least one button depressed to no buttons depressed. For touch, this is when physical contact is removed from the <a>digitizer</a>. For pen, this is when the pen is removed from physical contact with the digitizer.</p> | ||
<p>A user agent MUST <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerup</code> when a pointer leaves the <a>active buttons state</a>. For mouse, this is when the device transitions from at least one button depressed to no buttons depressed. For touch, this is when physical contact is removed from the <a>digitizer</a>. For pen, this is when the pen is removed from the physical contact with the digitizer while no button is depressed, or transitions from at least one button depressed to no buttons depressed while hovering.</p> | ||
<p>For input <a href=#mapping-for-devices-that-do-not-support-hover>devices that do not support hover</a>, a user agent MUST also <a href="#firing-events-using-the-pointerevent-interface">fire a pointer event</a> named <code>pointerout</code> followed by a pointer event named <code>pointerleave</code> after dispatching the <code>pointerup</code> event.</p> | ||
<div class="note">For mouse (or other multi-button pointer devices), this means <code>pointerdown</code> and <code>pointerup</code> are not fired for all of the same circumstances as <code>mousedown</code> and <code>mouseup</code>. See <a href="#chorded-button-interactions">chorded buttons</a> for more information.</div> | ||
</section> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random question: are there pens that have a (redundant/additional) "left click" button which would allow a hovering click? If so, we'd need to probably add that here too, unless that makes it too confusing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like it'd be pretty awkward to use, so there probably aren't any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, just tested this and Wacom Intuos Pro supports hovering left click as an option to be mapped to the two barrel buttons, in addition to the tip. By default the two buttons are set to right click and double click, but it IS possible (and Wacom Intuos Pro not that uncommon a device)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, we should probably mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related, see #97 - this may be a quirk of Wacom Intuos Pro and its driver. Perhaps it's best to leave this out for now, under the implied assumption that in this case the pen/driver will internally treat the hovering click button press as a "contact", which means it's covered adequately already by having
Pen contact
in the text thereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think that Wacom's button swapping is a low (driver) level setting that is beyond the scope of this spec. A similar case: mouse L/R button swapping is possible is in many (all?) OSes, and quite logically UI event spec is silent about it.