[Tip] Disable F12 Key (Developer Tools) in Mozilla Firefox
If you keep pressing F12 key by mistake in Mozilla Firefox web browser and it automatically opens Developer Tools sidebar, this article will help you in disabling the F12 key completely in Firefox.
F12 key is used to launch or open Developer Tools (sometimes referred as Developer Options) in web browsers. When you press F12 key in Firefox, it opens Developer Tools sidebar at right-side of the web browser as shown in following screenshot:
Advertisement
Developer Tools feature is used by web developers or advanced users to test new functionality or troubleshoot issues in their websites.
Basic users who want to use their web browser to surf the Internet, don’t need the Developer Tools feature. Many times users hit F12 key by mistake in place of F11 key which is used to switch to full screen mode. When the users keep hitting F12 key accidentally, it becomes irritating and annoying.
Fortunately, Mozilla team provides hidden secret preference/flag to permanently disable or turn off F12 key to open Developer Tools in Firefox. You can use this preference/flag to get rid of F12 key functionality to automatically open Developer Tools.
There are 2 preferences to disable F12 key in Firefox:
- One preference for Firefox 114 and previous versions
- Other preference for Firefox 115 and later versions
PS: Once you disable F12 key, you can still open Developer Tools using classic Ctrl+Shift+I hotkey.
If you also want to prevent or restrict F12 key from opening Developer Tools in Mozilla Firefox web browser, following methods will help you:
Disable F12 Key to Open Developer Tools in Firefox 114 and Earlier Versions
If you are using older versions of Firefox such as version 114.0 or prior, you’ll need to use following steps to disable F12 key:
Advertisement
1. Open Firefox and type about:config in the addressbar and press Enter. It’ll show you a warning message, click on “Accept the Risk and Continue” button. It’ll open Firefox’s hidden secret advanced configuration page i.e. about:config page.
2. Now type f12 in Search filter box and look for following preference in the window:
devtools.experiment.f12.shortcut_disabled
By default, the preference value is set to false, which means F12 key is set to open Developer Tools in Firefox.
3. To deactivate and disable F12 key to launch Dev Tools, double-click on devtools.experiment.f12.shortcut_disabled preference and set it to true. Alternatively, you can click on the Toggle icon given next to the preference name.
That’s it. Now when you’ll press F12 key in Firefox, it’ll show a message “To use the F12 shortcut, first open DevTools via the Web Developer Menu” and will not open Developer Tools section at the right-side.
NOTE: If you access Developer Tools using Firefox Menu or by pressing Ctrl+Shift+I keyboard shortcut, the above mentioned preference will reset to False and F12 key will start opening Developer Tools again.
Disable F12 Key to Open Developer Tools in Firefox 115 and Later Versions
In newer versions of Firefox (115.0 and later versions), Mozilla has removed the above mentioned preference and introduced a new preference to completely disable F12 key.
If you are using newer versions of Firefox, you’ll need to use following steps to disable F12 key:
1. Open Firefox and type about:config in the addressbar and press Enter. It’ll show you a warning message, click on “Accept the Risk and Continue” button. It’ll open Firefox’s hidden secret advanced configuration page i.e. about:config page.
2. Now type f12 in Search filter box and look for following preference in the window:
devtools.f12_enabled
By default, the preference value is set to true, which means F12 key is set to open Developer Tools in Firefox.
3. To deactivate and disable F12 key to launch Dev Tools, double-click on devtools.f12_enabled preference and set it to false. Alternatively, you can click on the Toggle icon given next to the preference name.
That’s it. Now if you press F12 key in Firefox, nothing will happen.
PS: To restore F12 key to launch Developer Tools again in Firefox, set the above mentioned preference to true.
Also Check:
[Tip] Disable “F12” Key to Open Developer Tools in Microsoft Edge
Comments
NOTE: Older comments have been removed to reduce database overhead. Be the first one to start the discussion.