firefox: don't allow sites to override shortcuts

Each key can have three states:

- reserved
- not reserved
- unset

When reserved, it cannot be overridden by any site. When not reserved,
it can be. When unset, it depends on the permissions.default.shortcuts.
Setting it to 2 will make the key reserved, otherwise not.

You can find if a key is reserved here:
 ./browser/base/content/browser-sets.inc

The key depends on the locale. For some reason, the default one is in
./browser/locales/en-US/browser/browserSets.ftl. It seems accel means
Ctrl for Unix.
This commit is contained in:
Vincent Bernat 2025-01-21 08:31:43 +01:00
parent 94bf2465c8
commit 289649e154

View file

@ -94,6 +94,9 @@ user_pref("browser.tabs.firefox-view", false);
//Don't close on last tab
user_pref("browser.tabs.closeWindowWithLastTab", false);
// Don't allow sites to override shortcurs
user_pref("permissions.default.shortcuts", 2);
// Disable safebrowsing malware (sends hash of each file to Google)
user_pref("browser.safebrowsing.malware.enabled", false);