discussions-and-proposals
discussions-and-proposals copied to clipboard
Support TouchTool in React Native touch events
Introduction
All native platforms support "Touch Tool" info that indicates the pointer type. This should be included in React Native natively.
Details
All native platforms know to identify what is the pointer type that triggered a touch event:
- Android: https://developer.android.com/reference/android/view/MotionEvent#getToolType(int)
- IOS: https://developer.apple.com/documentation/uikit/uitouch/touchtype
- Web: https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
- Windows: https://docs.microsoft.com/en-us/uwp/api/Windows.Devices.Input.PointerDevice?view=winrt-22621
Discussion points
My proposal is to add touchTool field to React Native touch events that will return one of:
fingerpeneraserunknown
That will be chosen per the native platform event info