---
slug: "firefox-macos-esc-fullscreen"
title: "Firefox: Setting to Prevent Exiting macOS Full Screen Mode with the ESC Key"
description: "An `about:config` tweak that stops the ESC key from exiting full-screen mode in Firefox on macOS."
url: "https://www.ytyng.com/en/blog/firefox-macos-esc-fullscreen"
publish_date: "2026-01-23T02:52:11.404Z"
created: "2026-01-23T02:52:11.406Z"
updated: "2026-05-11T13:13:41.282Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20260123/9cda75b10bb44eed94645c46868374e4.png.webp?width=768"
has_video: true
has_music: true
video_urls: ["https://media.ytyng.net/ytyng-blog/330/featured-video-1.mp4", "https://media.ytyng.net/ytyng-blog/330/featured-video-2.mp4", "https://media.ytyng.net/ytyng-blog/330/featured-video-3.mp4"]
music_urls: ["https://media.ytyng.net/ytyng-blog/330/featured-music-330-1.mp3", "https://media.ytyng.net/ytyng-blog/330/featured-music-330-2.mp3"]
lang: "en"
---

# Firefox: Setting to Prevent Exiting macOS Full Screen Mode with the ESC Key

## Problem

On macOS, when a Firefox window is in OS-level fullscreen (the green button), pressing the ESC key exits fullscreen.

This is inconvenient when you want to use ESC for other actions (e.g., closing a modal, closing the search bar, etc.), because you can accidentally exit fullscreen as well.

## Solution

Change a setting in `about:config`.

### Steps

1. Type `about:config` into Firefox’s address bar and press Enter.
2. Click “Accept the Risk and Continue.”
3. In the search bar, type `browser.fullscreen.exit_on_escape`.
4. Double-click the value and change it to `false`.

### Setting value

| Preference name | Default | After change |
|---|---|---|
| `browser.fullscreen.exit_on_escape` | `true` | `false` |

## Notes

- Even after changing this setting, you can still toggle fullscreen with the F11 key.
- You can also exit fullscreen from the macOS menu bar (View → Exit Full Screen).
- This is a different setting from the website Fullscreen API (e.g., YouTube video fullscreen).

## Verified environment

- macOS
- Firefox (as of January 2025)
