简体   繁体   English

如何在javascript中覆盖Firefox键绑定?

[英]How do I override Firefox keybindings in javascript?

I am writing an HTML5 application with some custom keybindings. 我正在编写带有一些自定义按键绑定的HTML5应用程序。 I want to use F3 as a keybinding to do some work in my application. 我想使用F3作为键绑定在我的应用程序中做一些工作。 However in Firefox, F3 opens up the search box. 但是,在Firefox中,F3会打开搜索框。 Does anyone know how to override (or remove) default keybindings from javascript? 有谁知道如何从javascript覆盖(或删除)默认的键绑定?

It seems to me that the bindings for the F1-F5 keys cannot be replaced. 在我看来,F1-F5键的绑定无法替换。 I moved to using F8 and everything is working now. 我开始使用F8,现在一切正常。 If someone is interested in the code, I can post a snippet (just leave a comment below). 如果有人对代码感兴趣,我可以发布一个代码段(只需在下面留下评论)。

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

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