为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

I want to use Control-W and Control-T to close and open tabs in OS X

  • 4 个回答
  • 4 人有此问题
  • 18 次查看
  • 最后回复者为 andrewgho

more options

On Windows, you can use Ctrl-W and Ctrl-T to close and open tabs. On OS X, you have to use Cmd-W and Cmd-T instead (this bothers me because it is asymmetric with using Ctrl-Tab and Shift-Ctrl-Tab to navigate between tabs). Ctrl-W and Ctrl-T don't seem to do anything by default, so it would be nice if both Cmd or Ctrl could be used as a modifier for closing and opening tabs. Is there a way to accomplish this?

I tried using the System Preferences > Keyboard > Keyboard Shortcuts tab to set Ctrl-W and Ctrl-T to operate the Close Tab and New Tab menu options, but, this does not work; when I press those key combinations, the File menu briefly flashes, but nothing else seems to happen.

Thanks in advance for your help!

On Windows, you can use Ctrl-W and Ctrl-T to close and open tabs. On OS X, you have to use Cmd-W and Cmd-T instead (this bothers me because it is asymmetric with using Ctrl-Tab and Shift-Ctrl-Tab to navigate between tabs). Ctrl-W and Ctrl-T don't seem to do anything by default, so it would be nice if both Cmd or Ctrl could be used as a modifier for closing and opening tabs. Is there a way to accomplish this? I tried using the System Preferences > Keyboard > Keyboard Shortcuts tab to set Ctrl-W and Ctrl-T to operate the Close Tab and New Tab menu options, but, this does not work; when I press those key combinations, the File menu briefly flashes, but nothing else seems to happen. Thanks in advance for your help!

所有回复 (4)

more options
more options

Firefox does not have an option to set custom keyboard shortcuts. Maybe there is an Add-on that can help

more options

Thank you very much for that pointer. It sure appears to be exactly the extension I need!

However, I found that the same behavior happens with that extension as when I use System Preferences > Keyboard Shortcuts to remap ^W to Close Tab and ^T to New Tab: the File menu flashes briefly when I press those key combinations, but no tab is closed or created. In addition, with this extension, the original Cmd-W and Cmd-T keybindings are totally overridden.

It seems like Firefox is somehow swallowing those key combinations. Not sure how or why.

more options

I have finally found a solution to this problem. The latest (currently not yet released) version of KeyRemap4MacBook (http://pqrs.org/macosx/keyremap4macbook/) includes options to turn on exactly this behavior. Here's a link to the version that includes this new functionality:

http://pqrs.org/macosx/keyremap4macbook/files/KeyRemap4MacBook-6.99.33.pkg.zip

If this solves the problem for you, I encourage you to make a donation to the author via the links on his website (he kindly added this feature at my request, with a one day turnaround time, wow!).

I still feel it would be good if Firefox had this functionality natively or via an extension, but, at least there is a workaround in the meantime.