[英]Key events outside the browser?
I couldn't resolve this on Google, but is it possible to register key events happening outside the browser?我无法在 Google 上解决这个问题,但是是否可以注册在浏览器之外发生的关键事件? Reason why is I got a new G19 gaming keyboard.
我得到一个新的 G19 游戏键盘的原因。 It has a 5-inch LCD screen on which I use LCDHOST to show an HTML file on screen.
它有一个 5 英寸的 LCD 屏幕,我使用 LCDHOST 在屏幕上显示一个 HTML 文件。
My issue here is that I wish to use JavaScript to detect key events so I can show different things when I'm in a game.我的问题是我希望使用 JavaScript 来检测关键事件,这样我在玩游戏时就可以显示不同的东西。
The HTML and JavaScript is local at my machine. HTML 和 JavaScript 在我的机器上是本地的。
If the browser has focus you can get the events.如果浏览器有焦点,您可以获得事件。 If not you can't.
如果不是,你不能。 To allow otherwise would be a HUGE security hole.
否则将是一个巨大的安全漏洞。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.