Firefox 的全局热键
有没有办法为网络浏览器添加热键(例如媒体按钮)?
这需要引发一个 javascript 事件。
我除了需要一个firefox扩展之外,如果解决方案也需要greasemonkey,我也可以(我看到growl将它们都用于javascript交互。但这就是javascript->pc而不是相反)
-编辑-这不可能是ATM吗?
Is there a way to add hotkeys (such as the media buttons) for the webbrowser?
This would need to cause a javascript event.
I except a firefox extension is required and i am ok if the solution requires greasemonkey as well (i seen growl use them both for javascript interaction. But thats javascript->pc not the other way around)
-edit- is this not possible ATM?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Firefox 支持称为
AppCommand
事件的事件。在 Windows 和 Linux 上,仅支持 7 个命令:后退、前进、重新加载、停止、搜索、书签和主页。要实现额外的命令,必须将支持添加到
widget/src/windows/nsWindow.cpp
和widget/src/gtk2/nsWindow.cpp
以生成这些附加类型AppCommand 事件。然后,扩展程序可以拦截这些事件以执行自定义操作。在 Android 上,支持一组不同的事件:Clear、VolumeUp、VolumeDown、Menu、Search。我不知道Fennec是否使用了这些事件。
为了完整起见,OS/2 版本的 Firefox 支持后退、前进、重新加载和停止。
Firefox supports something called an
AppCommand
event. On Windows and Linux, only 7 commands are supported: Back, Forward, Reload, Stop, Search, Bookmarks and Home.To implement extra commands, supported would have to be added to
widget/src/windows/nsWindow.cpp
andwidget/src/gtk2/nsWindow.cpp
to generate those additional types of AppCommand event. These events could then be intercepted by an extension to perform custom actions.On Android, a different set of events are supported: Clear, VolumeUp, VolumeDown, Menu, Search. I don't know whether these events are used by Fennec.
For completeness, OS/2 builds of Firefox support Back, Forward, Reload and Stop.