RFR: 8294426: Two fingers tap generates wrong mouse modifiers on M2 MacBooks

Phil Race prr at openjdk.org
Mon Oct 3 20:42:12 UTC 2022


On Fri, 30 Sep 2022 22:26:44 GMT, Nikita Provotorov <duke at openjdk.org> wrote:

>> Actually I mean that it returns 0 if you're tapping without holding any modifiers e.g. keyboard modifiers.
>> But if you're tapping holding a keyboard modifier it will probably return only this keyboard modifier without `InputEvent.BUTTON3_DOWN_MASK`. I didn't test this case but I would expect it that looking at the implementation of the `NSEvent.nsToJavaModifiers`.
>
> I don't have an M2 device to check, but I think (judging to the code) if we add `jmodifiers == 0` check here then users making a tap holding the Control will receive the mouse events with `modifiers` == `CTRL_DOWN_MASK | BUTTON3_MASK | CTRL_MASK`, i.e. without modern `BUTTON3_DOWN_MASK` which is at least unusual and inconvenient.

OK .. well I've at least run all our automated tests and no regressions were found, so I'll approve this.

-------------

PR: https://git.openjdk.org/jdk/pull/10429



More information about the client-libs-dev mailing list