Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

How can I disable the ctrl+t shortcut?

  • 8 trả lời
  • 0 gặp vấn đề này
  • 101 lượt xem
  • Trả lời mới nhất được viết bởi dan.murray

more options

How can I disable the ctrl+t shortcut? I have tried using the Shortkey add-on, but it will not touch the ctrl+t shortcut. It works for everything else, just not that one. I've been told I can modify the browser.xhtml file inside the omni.ja file, but I am finding that almost impossible. Has anyone managed to do this?

How can I disable the ctrl+t shortcut? I have tried using the Shortkey add-on, but it will not touch the ctrl+t shortcut. It works for everything else, just not that one. I've been told I can modify the browser.xhtml file inside the omni.ja file, but I am finding that almost impossible. Has anyone managed to do this?

Được chỉnh sửa bởi dan.murray vào

Tất cả các câu trả lời (8)

more options

Do you only want to disable "Ctrl+T" (open new tab) or also "Ctrl+Shift+T" (undo closed tab) ?

You can disable "Ctrl+T" via the autoconfig.cfg file. For "Ctrl+T" you need to disable key_newNavigatorTab For "Ctrl+Shift+T" you need key_restoreLastClosedTabOrWindowOrSession

See this answer for a possible way to disable specific keyboard shortcuts:

You need to replace this line:

let keys = ["key_close","key_closeWindow"];

With this line:

let keys = ["key_newNavigatorTab","key_restoreLastClosedTabOrWindowOrSession"];

Hữu ích?

more options

Yes, thank you! Ctrl+T was the primary one I was having trouble disabling. The Shortkeys add-on handled pretty much everything else.

Part of the challenge is figuring out what Mozilla calls the function you are trying to disable. In the Ctrl+T example, it was called "newNavigatorTab"... if you don't know that, you're kind of stuck.

Of course, now it appears Ctrl-N is not being blocked... trying to find the name for THAT function, now that I've let the config.sj genie out of the bottle! LOL That also opens a new tab, but in a new window.

Hữu ích?

more options

Giải pháp được chọn

Hữu ích?

more options

Is there a complete list somewhere of what shortcut keys call which function? The few that have been passed on here are great, but it would be helpful to have a comprehensive list.

Hữu ích?

more options

You can look at the Browser Toolbox.

To enable the Browser Toolbox, use this in the Web Developer Tools Settings (press F1 on any of the devtools like the Inspector).

Hữu ích?

more options

Sadly, I cannot see anything related to the actual keystrokes that invoke the functions. I suspect there must be a comprehensive list out there somewhere (I can't be the first person to want this LOL).

Hữu ích?

more options

Within a key tag, you can find the key in the key attribute. The modifiers attribute set what modifier key(s) like Shift (shift) and Ctrl (accel) and Alt (alt) you need to press. The data-l10n-id attribute gives some clues about the action and the command sets the action.

Ctrl+N -> key_newNavigator -> window-new-shortcut -> cmd_newNavigator

 <key id="key_newNavigator" data-l10n-id="window-new-shortcut" command="cmd_newNavigator" modifiers="accel" key="N"/>

Ctrl+Shift+W -> key_closeWindow -> close-shortcut -> cmd_closeWindow

 <key id="key_closeWindow" data-l10n-id="close-shortcut" command="cmd_closeWindow" modifiers="accel,shift" key="W"/>

Alt+CursorBack -> Browser:Back

 <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>

You would have to search the source code to get more information about a specific key code and action, there are usually explanatory comments.

Hữu ích?

more options

OK... maybe I'm blind to something here... I can find code with the <key id=...> in it, and it includes everything, such as the data-l10n-id, the command and the modifiers... but no actual key= part. Where are you finding that?

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.