Discussion:
JDK-8090930: Add Support for Extended Mouse Buttons
Michael Ennen
2018-08-29 22:43:37 UTC
Permalink
Hello All,

I am working on JDK-8090930 which is a request to add
support for the BACK/FORWARD mouse buttons that are
supported by some mice. I have opened a proof-of-concept
pull request on Github which can be found here:

https://github.com/javafxports/openjdk-jfx/pull/173

This is still in the early stages (no CSR has been created yet,
however there is a preliminary one in the comments on the
above Github issue) but Kevin wanted me to post a notification
to this list so that people can review and comment on it (and
I think that's a good idea, too).

Thanks,

Michael Ennen
Johan Vos
2018-10-30 12:15:08 UTC
Permalink
Hi Michael,

I only started to look into this now, sorry for being late at the party.
Overall, this looks good to me. The risk is indeed minimal (developers
relying on switch-default cases to select e.g. middle button will be
punished).

I am not entirely sure about the naming though. Should it really be
"BACK/FORWARD" or should it rather be "BUTTON4/BUTTON5" as it can be mapped
to whatever?

- Johan
Post by Michael Ennen
Hello All,
I am working on JDK-8090930 which is a request to add
support for the BACK/FORWARD mouse buttons that are
supported by some mice. I have opened a proof-of-concept
https://github.com/javafxports/openjdk-jfx/pull/173
This is still in the early stages (no CSR has been created yet,
however there is a preliminary one in the comments on the
above Github issue) but Kevin wanted me to post a notification
to this list so that people can review and comment on it (and
I think that's a good idea, too).
Thanks,
Michael Ennen
Michael Ennen
2018-10-30 19:33:58 UTC
Permalink
Great question. It seems to be pretty standard that mouse buttons 4 and 5
are called
back and forward. So either way would be fine with me. In my opinion the
descriptive
names may be better as then EventListeners responding to these new buttons
would
be more human-readable.
Post by Johan Vos
Hi Michael,
I only started to look into this now, sorry for being late at the party.
Overall, this looks good to me. The risk is indeed minimal (developers
relying on switch-default cases to select e.g. middle button will be
punished).
I am not entirely sure about the naming though. Should it really be
"BACK/FORWARD" or should it rather be "BUTTON4/BUTTON5" as it can be mapped
to whatever?
- Johan
Post by Michael Ennen
Hello All,
I am working on JDK-8090930 which is a request to add
support for the BACK/FORWARD mouse buttons that are
supported by some mice. I have opened a proof-of-concept
https://github.com/javafxports/openjdk-jfx/pull/173
This is still in the early stages (no CSR has been created yet,
however there is a preliminary one in the comments on the
above Github issue) but Kevin wanted me to post a notification
to this list so that people can review and comment on it (and
I think that's a good idea, too).
Thanks,
Michael Ennen
--
Michael Ennen
Kevin Rushforth
2018-10-30 22:17:13 UTC
Permalink
I don't have a strong opinion. On the one hand, the platform libraries
(at least Mac and Windows) use some variation of BUTTON4 and BUTTON5
rather than a name. On the other hand, we already use symbolic names for
the PRIMARY, SECONDARY, and MIDDLE buttons, rather than using 1, 2, 3.
I'm OK with the symbolic names FORWARD and BACK, but I also see Johan's
point.

-- Kevin
Post by Michael Ennen
Great question. It seems to be pretty standard that mouse buttons 4 and 5
are called
back and forward. So either way would be fine with me. In my opinion the
descriptive
names may be better as then EventListeners responding to these new buttons
would
be more human-readable.
Post by Johan Vos
Hi Michael,
I only started to look into this now, sorry for being late at the party.
Overall, this looks good to me. The risk is indeed minimal (developers
relying on switch-default cases to select e.g. middle button will be
punished).
I am not entirely sure about the naming though. Should it really be
"BACK/FORWARD" or should it rather be "BUTTON4/BUTTON5" as it can be mapped
to whatever?
- Johan
Post by Michael Ennen
Hello All,
I am working on JDK-8090930 which is a request to add
support for the BACK/FORWARD mouse buttons that are
supported by some mice. I have opened a proof-of-concept
https://github.com/javafxports/openjdk-jfx/pull/173
This is still in the early stages (no CSR has been created yet,
however there is a preliminary one in the comments on the
above Github issue) but Kevin wanted me to post a notification
to this list so that people can review and comment on it (and
I think that's a good idea, too).
Thanks,
Michael Ennen
Loading...