JavaScript 有没有办法区分老鼠?
我想连接几只鼠标 - 每一只用于不同类型的输入。 JavaScript 有没有办法区分每种鼠标?
我知道 JS 看起来可能不是合适的语言,但我想用一只鼠标进行网络导航,另一只鼠标进行 Google 地球导航。因为 Google-API 已经在使用 JS,所以我想我应该尝试将所有代码放在一起。
I am wanting to hook up several mice - each one used for different types of input. Is there a way in JavaScript to distinguish between each mouse?
I know that JS may not seem like the right language for this, but I want to use one mouse for web navigation, and the other for Google-earth navigation. Because the Google-API is already using JS, I figured I try to keep all the code together.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这对于 JavaScript 来说是不可能的。 JS 必须对客户端机器具有低级访问权限才能进行这种类型的区分。显然,这将是一个巨大的安全风险。
This is not possible with JavaScript. The JS would have to have low-level access to the clients machine to make this type of distinction. Obviously, this would be a huge security risk.