如何使用 ctrl+F4 禁用关闭 Firefox 7 选项卡
我一直在寻找一种使用 ctrl+F4
禁用关闭 Firefox 7 选项卡的方法。
很难找到一种简单的方法来做到这一点。锁定浏览器安全性将帮助我在 Linux Day 活动期间使用 Firefox 作为信息亭。
I have been browsing around to find a way to disable closing Firefox 7 tab using ctrl+F4
.
Kind of hard to find an easy way to do it. Lock down browser security will help me using Firefox as a kiosk during the Linux Day event.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您见过keyconfig 插件吗?
或者,更直接与信息亭相关:R-kiosk
Have you seen the keyconfig addon?
Or, more directly kiosk-related: R-kiosk
在 Firefox 地址栏中输入 about:config 并按 Enter 键,您将看到警告,请小心操作,然后查找诸如
browser.tabs.warnOnClose
、browser.tabs.closeWindowWithLastTab
。您需要修改二进制值或将布尔值从 true 更改为 false,反之亦然。如果您没有此类条目,请通过右键单击 > 创建它们。新的>布尔值。
PS:请谨慎操作。
In your Firefox address bar type about:config and hit enter you will be shown the warning to proceed with care, then look for the properties like
browser.tabs.warnOnClose
,browser.tabs.closeButtons
,browser.tabs.closeWindowWithLastTab
.You need to modify the binary values or change the boolean values from true to false or vice versa. If you don't have such entries, create them with
right-click > New > Boolean
.PS: Please proceed with care.
好奇,我从来不知道 CTRL+F4 能够关闭该选项卡。
我对这个案子进行了一些调查。我尝试在 Keyconfig 中禁用它,但没有成功。快捷方式甚至没有在那里列出。当您尝试向 CTRL+F4 添加其他快捷键以覆盖默认行为时,它仍然会关闭该选项卡。
请注意,CTRL+W 也可以关闭该选项卡,但在这种情况下,您可以在 Keyconfig 中禁用它。
因此,似乎 CTRL+W 和 CTRL+F4 的处理方式不同。
关于CTRL+F4,我找到了以下代码:
http://dxr.mozilla.org/mozilla-central/browser/base/content/tabbrowser.xml.html,第 2437 行中的#else:
我是 Mozilla 代码库的新手,所以我不知道在哪里搜索 CTRL+W 。但似乎 CTRL+F4 在 Windows 和 Linux 的编译时被硬编码,并且不容易(或根本)配置。
您可以考虑向 Bugzilla 报告错误,但我不知道这是否会得到最优先的处理。
Curious, I've never known CTRL+F4 is able to close the tab.
I've investigated the case a bit. I've tried disabling it in Keyconfig, but without success. The shortcut is not even listed there. When you try to add other shortcut to CTRL+F4 to override the default behavior, it still closes the tab.
Note that also CTRL+W is able to close the tab, but in this case you can disable it in Keyconfig.
Seems that CTRL+W and CTRL+F4 are handled different way therefore.
About CTRL+F4, I was able to find the following code:
http://dxr.mozilla.org/mozilla-central/browser/base/content/tabbrowser.xml.html, #else in line 2437:
I'm new to Mozilla code base, so I don't know where to search for CTRL+W however. But it seems CTRL+F4 is hardcoded at compile time for Windows and Linux and not easily (or at all) configurable.
You can think of reporting a bug to Bugzilla but I don't know if this would get top-priority treatment.