用javascript绑定按键,同时防止浏览器快捷键
我正在制作一个 javascript 游戏,需要将很多按键绑定到不同的功能。我知道该怎么做,我需要一些帮助来覆盖浏览器的快捷键。换句话说,我想模糊浏览器的热键并将它们转移到我的应用程序。
I'm making a javascript game and need to bind a lot of keys to different functions. This I know how to do, what I need some help on is over-riding the shortcut keys for the browser. in other-words I want to blur hot keys for the browser and divert them to my application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信,如果您停止事件的传播,那么您将阻止浏览器捕获该事件。
一个例子:
I believe that if you stop the propogation of the event, then you will prevent the browser from catching the event.
an example of this: