简体   繁体   English

如何使用JavaScript触发键盘快捷键(ctrl + alt + R)?

[英]How to Trigger Keyboard shortcut (ctrl+alt+R) using javascript?

I am trying to create a webpage that should be able to record the screen automatically. 我正在尝试创建一个应该能够自动记录屏幕的网页。 I am using "Screencastify" chrome extension to record the screen. 我正在使用“ Screencastify” chrome扩展程序来记录屏幕。 Here we need to use Ctrl + Alt + R to start/stop recording. 在这里,我们需要使用Ctrl + Alt + R开始/停止录制。 Is there any way to start/stop recording from a page's javascript? 有什么方法可以从页面的javascript开始/停止记录吗? Please let me know your thoughts on this. 请让我知道您对此的想法。

I'm afraid not. 恐怕不是。

Even if Screencastify has some API exposed (eg a custom event you could raise), it would probably run into problems that recording screen requires an explicit invocation of the extension by the user. 即使Screencastify公开了一些API(例如,您可能引发的自定义事件),也可能会遇到以下问题:录制屏幕需要用户显式调用该扩展名。

That said, a quick glance shows that there is no such API exposed. 也就是说,快速浏览一下就可以发现没有暴露这样的API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM