在无重启的Firefox插件中添加shorcut键 [英] Add shorcut key in a restartless Firefox addon
问题描述
我的意思是不使用SDK。
我试图添加一个元素到mainKeyset。这个键是在安装时添加的,但是它的功能只有在重新启动后才会触发。 com / Noitidart / _ff-addon-demo-BootstrapHotkey / commits?author = Noitidartrel =nofollow noreferrer> GitHub :: Noitidart / _ff-addon-demo-BootstrapHotkey 我在这里根据这个话题做了这个: Firefox附加快捷方式不起作用了
您必须创建自己的密钥集,而不是添加到mainKeyset,因为密钥集被附加到文档时连接了密钥流。每一个主题链接上面
该演示插件广告Ctrl + F12作为一个热键到所有的窗口,包括视图源等等,其实非常激进,按下Ctrl + F12打开一个警报,并在该警报这个热键也是可用的。所以你会得到警报,如果你按Hotkye产生警报。有趣的东西。
Does anybody know how can I add a shorcut key in a restartless Firefox addon? I mean without using SDK. I tried to add a element to the "mainKeyset". The key is added on install but its function triggers only after restart.
GitHub :: Noitidart/_ff-addon-demo-BootstrapHotkey i made this based on this topic here: firefox add-on shortcut does not work anymore
You have to make your own keyset instead of adding to mainKeyset because key liseteners are connected when keyset is appended to document. per the topic linked above
That demo addon ads Ctrl+F12 as a hotkey to all windows, including view source etc etc. Its actually very agressive, pressing Ctrl+F12 opens an alert, and in that alert this hotkey is available as well. So youll get the alert to spawn an alert if u press the hotkye. fun stuff.
这篇关于在无重启的Firefox插件中添加shorcut键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!