Skip to content
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

Merged
merged 3 commits into from Jul 13, 2016

Conversation

@mustaqahmed
Copy link
Contributor

commented Jun 23, 2016

To support button presses on a hovering stylus, button and buttons shouldn't require a pen contact when barrel/eraser buttons are pressed. This change makes pen buttons independent of pen contact.

Note that contact independent button/buttons values cause subtle changes in active button state.

Closes #14.

mustaqahmed added some commits Jun 22, 2016

Removed "pen contact" condition on button/buttons.
To support button presses on a hovering stylus, button and buttons shouldn't require a pen contact when barrel/eraser buttons are pressed.
index.html Outdated
@@ -364,7 +364,7 @@
<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><b>Mouse moved with no buttons pressed</b><br>, Pen moved without changing its <a>active buttons state</a></td><td>0</td></tr>

This comment has been minimized.

Copy link
@mustaqahmed

mustaqahmed Jun 23, 2016

Author Contributor

A quick thought: this seems more correct to replace the mouse/pen specific lines with:
"No change in active buttons state => 0"

index.html Outdated
@@ -211,7 +211,7 @@
<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 the pen either has physical contact with the digitizer, or has at least one button depressed while hovering.</dd>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

"...or at least one button is depressed while hovering"

It may also need an extra qualifier at the end of that sentence, along the lines of "(for hardware that supports this)"? Or do all digitizers with pens that have buttons intrinsically able to recognize these buttons? (the answer here may be yes, though perhaps even then the qualifier may be useful to have)

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Jun 27, 2016

Member

I don't think it needs an extra qualifier. If the device doesn't have a button, then that portion of the conditional will just never be met, but it's an or so it doesn't matter.

index.html Outdated
<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>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

Maybe for consistency (with the likes of "Left Mouse", "Right Mouse" etc) remove "pressed"?

This comment has been minimized.

Copy link
@mustaqahmed

mustaqahmed Jul 11, 2016

Author Contributor

I have removed all the "pressed" you suggested,

index.html Outdated
<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>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

Remove "pressed"? (see below)

index.html Outdated
<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>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

Remove "pressed"

index.html Outdated
<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>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

Remove "pressed"

@@ -348,12 +348,12 @@
<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>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

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?

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Jun 27, 2016

Member

That seems like it'd be pretty awkward to use, so there probably aren't any.

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 27, 2016

Member

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)
wacom-intuos-pro

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Jun 27, 2016

Member

In that case, we should probably mention it.

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 28, 2016

Member

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 there

This comment has been minimized.

Copy link
@mustaqahmed

mustaqahmed Jul 11, 2016

Author Contributor

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.

index.html Outdated
@@ -364,13 +364,13 @@
<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 without changing its <a>active buttons state</a></td><td>0</td></tr>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Jun 26, 2016

Member

Unless I'm misunderstanding this, would this not mean that for a hovering pen, the first time the user presses one of the buttons, they'd get a non-zero buttons, but on subsequent move they'd get 0 regardless of what buttons are pressed as it's not "transitioning" per the new active buttons definition? So buttons wouldn't reflect the state, but just a change, and only once?

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Jun 27, 2016

Member

This should be hovering pen moved with no buttons pressed. The active buttons state shouldn't come into play.

This comment has been minimized.

Copy link
@mustaqahmed

mustaqahmed Jul 11, 2016

Author Contributor

Good catch, thanks. Hope this is more precise now.

@patrickhlauke

This comment has been minimized.

Copy link
Member

commented Jul 11, 2016

LGTM (and ignore the remaining note/discussion about hovering click, as I think that's sufficiently addressed in current wording and not exactly standard anyway).

@@ -364,13 +364,13 @@
<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>

This comment has been minimized.

Copy link
@mustaqahmed

mustaqahmed Jul 11, 2016

Author Contributor

Pen moved while hovering with no buttons pressed

Note that "moved" here includes the cases when the "footprint" of the pen is unmoved: e.g. a change in twist. I think the pen still must move physically to generate an event, so this is fine.

Do we need a note?

This comment has been minimized.

Copy link
@RByers

RByers Jul 13, 2016

Contributor

I think it's fine to treat that as implied.

@RByers

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2016

LGTM. Not seeing any other objections to the wording, let's land this for now - we can always continue to iterate.

@RByers

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2016

Oh except this is substantial enough that we probably need an entry in the changlog for it (just link to the PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.