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

ค้นหาฝ่ายสนับสนุน

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

เรียนรู้เพิ่มเติม

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

  • 5 การตอบกลับ
  • 0 คนมีปัญหานี้
  • 63 ครั้งที่ดู
  • ตอบกลับล่าสุดโดย 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

การตอบกลับทั้งหมด (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

ถามคำถาม

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.