Firefox 的全局热键

发布于 2024-09-10 04:53:55 字数 195 浏览 0 评论 0原文

有没有办法为网络浏览器添加热键(例如媒体按钮)?

这需要引发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵你的手,一向走下去 2024-09-17 04:53:55

Firefox 支持称为 AppCommand 事件的事件。在 Windows 和 Linux 上,仅支持 7 个命令:后退、前进、重新加载、停止、搜索、书签和主页。

要实现额外的命令,必须将支持添加到 widget/src/windows/nsWindow.cppwidget/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 and widget/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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文