Use case
The "raw" PointerEvent has a field buttons to figure what which buttons were pressed; notably in the cause of mouses it is particularly relevant to distinguish between left, right and middle clicks.
However, when using the more user-friendly recognizers, that expose events as TapUpDetails and TapDownDetails, this field is not propagated. In particularly, it is jarring to use MultiTapGestureRecognizer, because you can set a allowedButtonsFilter, but if you allow more than one type of button, you won't be able to determine which one it was (at least as far as I can tell).
Proposal
I believe adding this would be very simple, though with the caveat that if we want to avoid breaking changes we need to make it optional. I suspect that is historically how the kind field was added to TapDownDetails because is also optional (though it is required on TapUpDetails, so maybe we are willing to add a required field - honestly I don't expect users to be creating "synthetic" events all that often and would be a very simple fix if they are).
As a proof of concept, I have started working on a PR showing how it could be added (still need to add some tests, but wanted to raise the discussion on an issue first).
Use case
The "raw"
PointerEventhas a fieldbuttonsto figure what which buttons were pressed; notably in the cause of mouses it is particularly relevant to distinguish between left, right and middle clicks.However, when using the more user-friendly recognizers, that expose events as
TapUpDetailsandTapDownDetails, this field is not propagated. In particularly, it is jarring to useMultiTapGestureRecognizer, because you can set aallowedButtonsFilter, but if you allow more than one type of button, you won't be able to determine which one it was (at least as far as I can tell).Proposal
I believe adding this would be very simple, though with the caveat that if we want to avoid breaking changes we need to make it optional. I suspect that is historically how the
kindfield was added toTapDownDetailsbecause is also optional (though it is required onTapUpDetails, so maybe we are willing to add a required field - honestly I don't expect users to be creating "synthetic" events all that often and would be a very simple fix if they are).As a proof of concept, I have started working on a PR showing how it could be added (still need to add some tests, but wanted to raise the discussion on an issue first).