aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 373584b4e..1d3c77ec7 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -73,6 +73,7 @@ export default class KeyManager {
}
MainView.Instance.toggleColorPicker(true);
SelectionManager.DeselectAll();
+ DictationManager.Instance.stop();
break;
case "delete":
case "backspace":
@@ -106,10 +107,11 @@ export default class KeyManager {
switch (keyname) {
case " ":
- let transcript = await DictationManager.Instance.listen();
+ console.log("Listening...");
+ let analyzer = DictationManager.Instance;
+ let transcript = await analyzer.listen();
console.log(`I heard${transcript ? `: ${transcript.toLowerCase()}` : " nothing: I thought I was still listening from an earlier session."}`);
- let command: ContextMenuProps | undefined;
- transcript && (command = ContextMenu.Instance.findByDescription(transcript, true)) && "event" in command && command.event();
+ transcript && analyzer.execute(transcript);
}
return {