From 839062ee6b2734e11aadd8d56cbb1d62a68182e5 Mon Sep 17 00:00:00 2001 From: csf Date: Thu, 14 Apr 2022 23:23:20 +0800 Subject: [PATCH] android input,mouse right -> back,wheel -> home --- .../kotlin/com/carriez/flutter_hbb/InputService.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt b/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt index 1bbfe748d..b298cd574 100644 --- a/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt +++ b/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt @@ -55,6 +55,7 @@ class InputService : AccessibilityService() { if (mask == 9) { leftIsDown = true startGesture(mouseX, mouseY) + return } // left down ,was down @@ -66,6 +67,17 @@ class InputService : AccessibilityService() { if (mask == 10) { leftIsDown = false endGesture(mouseX, mouseY) + return + } + + if (mask == 18) { + performGlobalAction(GLOBAL_ACTION_BACK) + return + } + + if (mask == 34) { + performGlobalAction(GLOBAL_ACTION_HOME) + return } }