From ca2bf0e2d3be6da58bb6d4ffc98f6a13a9a6fb57 Mon Sep 17 00:00:00 2001 From: Brendan Nelligan Date: Wed, 22 Mar 2023 16:19:39 -0400 Subject: [PATCH] Raise the Select MixedrealityInputAction when the Select voice command is recognized Fixes an issue where the Select keyword fails to raise a MixedRealityInputAction when recognized at the system level. --- Assets/MRTK/Providers/OpenXR/Scripts/OpenXRDeviceManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MRTK/Providers/OpenXR/Scripts/OpenXRDeviceManager.cs b/Assets/MRTK/Providers/OpenXR/Scripts/OpenXRDeviceManager.cs index ba8b383b46e..0a576870513 100644 --- a/Assets/MRTK/Providers/OpenXR/Scripts/OpenXRDeviceManager.cs +++ b/Assets/MRTK/Providers/OpenXR/Scripts/OpenXRDeviceManager.cs @@ -131,7 +131,7 @@ public override void Update() // when you add it to the speech commands profile. Therefore, simulate // the "select" voice command running to ensure that we get a select voice command // registered. This is used by FocusProvider to detect when the select pointer is active. - Service?.RaiseSpeechCommandRecognized(controller.InputSource, RecognitionConfidenceLevel.High, TimeSpan.MinValue, DateTime.Now, new SpeechCommands("select", KeyCode.Alpha1, MixedRealityInputAction.None)); + Service?.RaiseSpeechCommandRecognized(controller.InputSource, RecognitionConfidenceLevel.High, TimeSpan.MinValue, DateTime.Now, new SpeechCommands("Select", KeyCode.Alpha1, new MixedRealityInputAction(1, "Select", AxisType.Digital))); } shouldSendVoiceEvents = false;