Skip to content

Commit 741fa69

Browse files
author
Joost van Schaik
committed
Spoken phrase is showed TWICE if the user's gaze strikes the keyboard when the recording takes place
1 parent d7fdb3b commit 741fa69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Assets/HoloToolkit/UX/Scripts/Keyboard.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ public void OnDictationHypothesis(DictationEventData eventData)
322322
/// <param name="eventData">Dictation event data</param>
323323
public void OnDictationResult(DictationEventData eventData)
324324
{
325+
if (eventData.used)
326+
{
327+
return;
328+
}
325329
var text = eventData.DictationResult;
326330
ResetClosingTime();
327331
if (text != null)
@@ -332,6 +336,7 @@ public void OnDictationResult(DictationEventData eventData)
332336
m_CaretPosition += text.Length;
333337

334338
UpdateCaretPosition(m_CaretPosition);
339+
eventData.Use();
335340
}
336341
}
337342

0 commit comments

Comments
 (0)