Join us to show up for other Firefox users 🦊. Earn fun badges and Mozilla swag vouchers! Find out more: https://mzl.la/askafox150

Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Caută ajutor

Atenție la excrocheriile de asistență. Noi nu îți vom cere niciodată să suni sau să trimiți vreun SMS la vreun număr de telefon sau să dai informații personale. Te rugăm să raportezi activitățile suspecte folosind opțiunea „Raportează un abuz”.

Află mai multe

How can I prevent a user accessing the Library pop-up (Ctrl+Shift+o)

  • 5 răspunsuri
  • 0 au această problemă
  • 45 de vizualizări
  • Ultimul răspuns dat de Mike Kaply
  • Open

I am using Firefox as a multi-tab courseware viewer but need to block the user bringing up the Library page as then the user can see the courseware URL's - I am running it on AWS AppStream and can lock most features down., but this one eludes me - there seems to be no policy to block it. I have tried intercepting keystrokes at the GNOME level and autoconfig javascript to block keys. Is there a way to do this please? Blessings, Ian

I am using Firefox as a multi-tab courseware viewer but need to block the user bringing up the Library page as then the user can see the courseware URL's - I am running it on AWS AppStream and can lock most features down., but this one eludes me - there seems to be no policy to block it. I have tried intercepting keystrokes at the GNOME level and autoconfig javascript to block keys. Is there a way to do this please? Blessings, Ian

Toate răspunsurile (5)

You can change or even clear it on about:keyboard.

Can I do this programmatically? Where do the settings get stored please?

Use this in your autoconfig (firefox.cfg): // Block Library page (Ctrl+Shift+O) Services.obs.addObserver((win) => {

 if (win.location.href.includes("places.xhtml")) win.close();

}, "domwindowopened", false); That’s the most reliable way on AppStream. If you want it even stronger, also hide the menu item with userChrome.css and globally block the hotkey at GNOME level. This should do it.

In the end I did this by:

  • Added an event listener in an extension with the code:


// =========================================================================
 // 1. KEYBOARD LOCKDOWN
 // =========================================================================
 const ALLOWED_KEYS = [
   // New contexts
   { key: "f",   ctrl: true,                description: "Find" },
   { key: "r",   ctrl: true,                description: "Reload" }
 ];
 
 window.addEventListener("keydown", function (e) {
   for (const rule of ALLOWED_KEYS) {
     if (
       e.key        === rule.key       &&
       !!rule.ctrl  === e.ctrlKey      &&
       !!rule.shift === e.shiftKey     &&
       !!rule.alt   === e.altKey       &&
       !!rule.meta  === e.metaKey
     ) {
       return;
     }
   }
   
   if (e.ctrlKey || e.altKey) {
     e.preventDefault();
     e.stopImmediatePropagation();
     e.stopPropagation();
     return false;
   }
 }, true);


  • Added to my userChrome.css:


/* Hide the Library Window Content (Bookmarks/History Manager) */ window#placesContext, window#places {

   display: none !important;
   visibility: hidden !important;

}

I'm investigating making some aspect of about:keyboard available to policy.

I'd love to talk more about what you're doing though.

Would you mind reaching out directly?

mkaply at mozilla.com

Adresează o întrebare

Trebuie să intri în cont ca să răspunzi la o postare. Te rugăm să adresezi o întrebare nouă dacă nu ai încă un cont.