Skip to content

Commit

Permalink
Removed "pen contact" condition on button/buttons.
Browse files Browse the repository at this point in the history
To support button presses on a hovering stylus, button and buttons shouldn't require a pen contact when barrel/eraser buttons are pressed.
  • Loading branch information
mustaqahmed committed Jun 22, 2016
1 parent fe55057 commit 4acebe9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 pressed</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 pressed</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>
Expand All @@ -365,12 +365,12 @@ <h3>The <code>buttons</code> property</h3>
<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>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 pressed</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 pressed</td><td>32</td></tr>
</tbody>
</table>
</section>
Expand Down

0 comments on commit 4acebe9

Please sign in to comment.