简体   繁体   English

通过我的网页上的FireBreath插件禁用键盘输入

[英]Disable keyboard input via FireBreath plugin on my web page

Can i somehow disable all keyboard input for user on my web page via plugin on that page? 我可以通过网页上的插件以某种方式禁用网页上用户的所有键盘输入吗? (plugin written with FireBreath) (使用FireBreath编写的插件)
I don't need it to make user unable to input in some specific input field (I know, that it can be achieved another, lot more easier way), I just need to totally disable some keyboard keys input for web page, containing my plugin object, for some time. 我不需要它可以使用户无法在某些特定的输入字段中输入(我知道,这可以通过另一种更简单的方法来实现),我只需要完全禁用一些用于网页的键盘按键输入,其中包含我的插件对象,已有一段时间。

No you cannot. 你不能。 Pretty sure ActiveX controls cannot do this (in IE) and NPAPI plugins cannot preempt the browser in this way. 可以肯定的是ActiveX控件无法做到这一点(在IE中),而NPAPI插件也不能以此方式抢占浏览器。

I guess there might be some possible way to do it using windows system API calls, since you can get the browser HWND, so maybe you could hijack the winproc, but I think you'd find it to be pretty fragile -- not to mention you'd likely tick off the people who maintain the browsers' plugin blacklists... Anyway, there is definitely no "normal" way to do it, so if there is a hack that would work it would involve some fairly complex API programming and is way beyond anything I know how to do. 我猜可能会有一些使用Windows系统API调用的方法,因为您可以获得浏览器HWND,因此也许可以劫持winproc,但我认为您会发现它非常脆弱-更不用说您可能会剔除维护浏览器插件黑名单的人员...无论如何,绝对没有“正常”的方法可以这样做,因此,如果有可行的hack,它将涉及一些相当复杂的API编程,并且是我所不知道的怎么做。 You'd want to ask that as a windows api question instead of a plugin question. 您想将其作为Windows api问题而不是插件问题问。

On Mac there is absolutely no way to do it, since you have no way to access the window for the browser. 在Mac上,绝对无法执行此操作,因为您无法访问浏览器窗口。 Linux is anybody's guess, but I suspect there is no way there either. Linux是任何人的猜测,但是我怀疑也没有办法。

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

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