From a1412d2ff97d6ca48429eefcb8f38011e17e4ec8 Mon Sep 17 00:00:00 2001 From: lpcy <70789644+lpcy@users.noreply.github.com> Date: Wed, 3 May 2023 22:55:50 +0800 Subject: [PATCH] To support the touch pad of the magnetic keyboard on Android tablets. --- flutter/lib/models/input_model.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter/lib/models/input_model.dart b/flutter/lib/models/input_model.dart index ff0faf7a4..8239bbf5a 100644 --- a/flutter/lib/models/input_model.dart +++ b/flutter/lib/models/input_model.dart @@ -311,7 +311,7 @@ class InputModel { void onPointHoverImage(PointerHoverEvent e) { _stopFling = true; - if (e.kind != ui.PointerDeviceKind.mouse) return; + if (e.kind != ui.PointerDeviceKind.mouse && e.kind != ui.PointerDeviceKind.touch) return; if (!isPhysicalMouse.value) { isPhysicalMouse.value = true; } @@ -439,7 +439,7 @@ class InputModel { void onPointDownImage(PointerDownEvent e) { debugPrint("onPointDownImage"); _stopFling = true; - if (e.kind != ui.PointerDeviceKind.mouse) { + if (e.kind != ui.PointerDeviceKind.mouse && e.kind != ui.PointerDeviceKind.touch) { if (isPhysicalMouse.value) { isPhysicalMouse.value = false; } @@ -450,7 +450,7 @@ class InputModel { } void onPointUpImage(PointerUpEvent e) { - if (e.kind != ui.PointerDeviceKind.mouse) return; + if (e.kind != ui.PointerDeviceKind.mouse && e.kind != ui.PointerDeviceKind.touch) return; if (isPhysicalMouse.value) { handleMouse(getEvent(e, _kMouseEventUp)); }