简体   繁体   English

浏览器之外的关键事件?

[英]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.

相关问题 有没有办法在浏览器窗口之外跟踪鼠标事件? - Is there a way to track mouse events outside of a browser window? 有没有办法从浏览器外运行的程​​序触发 DOM 事件? - Is there a way to trigger DOM events from a program running outside the browser? 两个Key Up事件,我需要将这两个事件中的数据都放入两个变量中 - Two Key Up events and I need data from both into two variables outside these events 我需要使用javascript在浏览器中将关键事件触发到SWF - I need to fire key events to a SWF, in a browser, using javascript 如何在Windows Mobile 5浏览器中检测JavaScript按键事件? - How to detect JavaScript key events in Windows Mobile 5 browser? 浏览器键事件是否仅对焦点元素触发(冒泡)? - Do browser key events fire (bubble) only to elements in focus? 在Wii-U web浏览器中捕获游戏手柄输入按键事件 - Capturing gamepad input key events in Wii-U web browser 有没有办法从外部(例如从浏览器控制台或附加组件)收听诸如 routechangestart 之类的角度事件? - Is there a way to listen to angular events like routechangestart from outside, like from browser console or an add on? 事件之外的JavaScript缓慢 - JavaScript slowness outside events javascript:窗外事件 - javascript: events outside of a window
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM