From 5b2c16f3424d0478c17b8155818e9032e7268976 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 30 Dec 2019 08:27:20 -0600 Subject: [PATCH] Filter out `InputEventMouseButton` with device ID of -1, which seems to indicate an origin of touchscreen. Only pass through if explore-by-touch is active. --- ScreenReader.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ScreenReader.gd b/ScreenReader.gd index c4208a1..96cb464 100644 --- a/ScreenReader.gd +++ b/ScreenReader.gd @@ -158,7 +158,9 @@ func _input(event): return if not explore_by_touch and OS.get_ticks_msec() - touch_start_time >= explore_by_touch_interval: explore_by_touch = true - TTS.speak("Explore") + if event is InputEventMouseButton: + if event.device == -1 and not explore_by_touch: + get_tree().set_input_as_handled() func _process(delta): if touch_stop_time and OS.get_ticks_msec() - touch_stop_time >= tap_execute_interval and tap_count != 0: