Home > OS >  How to trigger win key h (to enable Dictate) using Javascript or jQuery?
How to trigger win key h (to enable Dictate) using Javascript or jQuery?

Time:08-02

I want to do speech to text convertion in a web application(based on jQuery). There are some codes available online in which speech to text is working only in Chrome but not on Edge browser.

I see Microsoft Dictate is the only option in Edge browser and also comes with high accuracy. With win key h, we can enable Dictate option but I want to enable it when clicking a button in the web application.

Can anyone suggest an idea to fire windows key h combination from javascript or jQuery?

CodePudding user response:

Win H key combination would not be able be fired from the browser – you would need an API through the browser to activate Dictate but I don't believe there is one specifically for Dictate.

For an alternative suggestion, you could try the Speech Synthesis API which "can be used to […] start and pause speech". This API has wider support than just Chrome.

CodePudding user response:

You might be looking for something similar to Sendkeys? But as far as I know, it's not possible. Because if such a function is allowed to be implemented in the browser, it will be a very big security risk.

Just like something mentioned in this case: Can I do SendKeys in Javascript?.

  • Related