Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Change a default shortcut on Firefox for Windows 10

  • 4 отговора
  • 1 има този проблем
  • 15 изгледи
  • Последен отговор от cor-el

more options

Dear Firefox support.

Hi, I'd like to change a default shortcut. I'd like to use Ctrl + Shift + N to open a private browser window. The default shortcut is Ctrl + Shift + P, but in every other browser it is Ctrl + Shift + N, so I'd like that also in Firefox that shortcut would be Ctrl + Shift + N. Is there a way to change it?

Thanks for the support.

Emanuele

Dear Firefox support. Hi, I'd like to change a default shortcut. I'd like to use Ctrl + Shift + N to open a private browser window. The default shortcut is Ctrl + Shift + P, but in every other browser it is Ctrl + Shift + N, so I'd like that also in Firefox that shortcut would be Ctrl + Shift + N. Is there a way to change it? Thanks for the support. Emanuele

Всички отговори (4)

more options

I dont know? Seems like pressing keys is more work than just clicking a mouse button.

Have you tried right clicking on the taskbar shortcut for opening private windows?

more options

Yes, of course I tried, but it is not what I want to do. To really work less you should never take your hands off the keyboard.

more options

You can possibly achieve this with code in an autoconfig.cfg file, but "Ctrl+Shift+N" is taken by Undo Closed Window and thus isn't available and you would have to remove this shortcut key as well.


// autoconfig.cfg must start with a comment line
 try {
  let {classes:Cc, interfaces:Ci, manager:Cm, utils:Cu} = Components;
  const {Services} = Cu.import('resource://gre/modules/Services.jsm');
  function ConfigJS() { Services.obs.addObserver(this, 'chrome-document-global-created', false); }
  ConfigJS.prototype = {
   observe: function (aSubject) { aSubject.addEventListener('DOMContentLoaded', this, {once: true}); },
   handleEvent: function (aEvent) {
    let document = aEvent.originalTarget;
    let window = document.defaultView;
    let location = window.location;
    if (/^(chrome:(?!\/\/(global\/content\/commonDialog|browser\/content\/webext-panels)\.x?html)|about:(?!blank))/i.test(location.href)) {
     if (window._gBrowser) {
      let myKeyChanges = [{id:'key_privatebrowsing',newkey_sc:'N'},{id:'key_undoCloseWindow',newkey_sc:'--'}];
      var i,mK,menuitem;
      for (i=0; mK=myKeyChanges[i]; i++){
       menuitem = window.document.getElementById(mK.id);
       if (menuitem) {
        if (mK.newlabel) menuitem.setAttribute('label', mK.newlabel);
        if (mK.newkey_ac) {
         if (mK.newkey_ac=='--') menuitem.removeAttribute('accesskey');
         else menuitem.setAttribute('accesskey', mK.newkey_ac);
        }
        if (mK.newkey_sc) {
         if (mK.newkey_sc=='--') {
          menuitem.removeAttribute('key');
          menuitem.removeAttribute('modifiers');
         }
         else menuitem.setAttribute('key', mK.newkey_sc);
        }
       }
      }
     }
    }
   }
  };
  if (!Services.appinfo.inSafeMode) { new ConfigJS(); }
 } catch(ex) {};