VS Code

How to Exit Zen Mode in VSCode Quickly

How to Exit Zen Mode in VSCode Quickly

Double-tap Escape. On Windows, macOS and Linux alike, that gets you out of Zen Mode in VSCode, and it has worked that way since version 1.8 shipped in November 2016.

Sometimes Escape doesn’t get through, usually because a vim extension or the terminal grabbed it first. Then you use the Ctrl+K Z toggle chord (Cmd+K Z on macOS) or run View: Toggle Zen Mode from the Command Palette. The VS Code documentation lists both.

One more thing catches people. Zen Mode puts the window in full screen by default (zenMode.fullScreen is true in the current documentation), and you can leave Zen Mode and still be stuck in full screen. Press F11 on Windows and Linux, or Ctrl+Cmd+F on macOS.

How Do You Exit Zen Mode in VSCode With Esc Esc?

YouTube player

The documentation doesn’t spend much time on this. Its whole explanation is one line: “Double press Esc to exit Zen mode.”

  1. Click into the editor so it has focus.
  2. Press Esc.
  3. Press Esc again right away.

Everything Zen Mode hid comes back: the activity bar, status bar, side bar and panel. (Zen Mode hides every part of the interface except the editor, so that’s the full list.)

There’s no Ctrl or Cmd in the gesture, which is why it behaves the same on macOS as on Windows and Linux.

If you want to see what’s actually happening, the keypress runs workbench.action.exitZenMode, and that binding only fires inside the inZenMode context. You can check it on your own install. Open the Command Palette, run “Preferences: Open Default Keyboard Shortcuts (JSON)”, and search for the command name. The keybindings documentation describes that route.

Which Other Methods Exit Zen Mode in VSCode?

Escape isn’t the only way out. The table has the alternatives, and none of them need that key.

MethodKeys or pathNeeds EscapePick it when
Esc EscEsc, EscYesDefault quick exit
Toggle chordCtrl+K Z (Cmd+K Z on macOS)NoEscape is remapped or captured
Command PaletteCtrl+Shift+P or Cmd+Shift+P, then View: Toggle Zen ModeNoThe chord conflicts with another binding
View menuView > Appearance > Zen ModeNoThe keyboard is out of the picture

For the chord, press Ctrl+K, then Z. The tips and tricks page lists Ctrl+K Z for Windows and Linux and Cmd+K Z for macOS. In the Command Palette, typing “zen” is enough to bring up View: Toggle Zen Mode. The menu route takes three clicks and no typing at all.

Under the hood, all of these run workbench.action.toggleZenMode. It’s a toggle, so it exits when Zen Mode is on and enters when it’s off. Good to know if you press it twice and wonder why you’re back in.

None of this is new. Version 1.8, the November 2016 release, shipped Zen Mode with a View menu entry, a Command Palette command and the Ctrl+K Z shortcut from the start. The only change since is that the menu item moved into the View > Appearance submenu.

My order: the chord, and if that’s taken, the Command Palette. The menu is a last resort.

Of the fallbacks, the Command Palette is the hardest to break. It depends on one shortcut, and if Ctrl+Shift+P is taken, F1 opens it too. Type “toggle zen mode” and you’re there.

Why Is Zen Mode Not Exiting?

Usually something else got to the Escape key first, either another binding or an extension. Less often, a custom rule deleted the default exit binding. While you figure out which one it is, the Command Palette route still works, since it never touches Escape.

  1. Click into a normal editor tab and press Esc twice again.
  2. Run View: Toggle Zen Mode from the Command Palette. If that exits, the keybinding or focus is the problem.
  3. Open the Keyboard Shortcuts editor with Ctrl+K Ctrl+S (Cmd+K Cmd+S on macOS) and search for “exitZenMode”. Check whether the default entry is missing or changed.
  4. Right-click any Escape entry and choose “Show Same Keybindings” to list conflicts.
  5. Still stuck? Run “Developer: Toggle Keyboard Shortcuts Troubleshooting”, press Esc twice, and read the Output panel to see which command received the keypress.

Escape Captured by an Extension or the Terminal

Extensions that rebind Escape cause most of these. Start with your installed VSCode extensions. Vim emulators like VSCodeVim and vscode-neovim are the first ones I’d look at, since Normal mode depends on that key.

In the Keyboard Shortcuts editor, search “escape” and read the When column for each result. That tells you who owns the key. Disable the extension for the workspace and try Esc Esc again.

The integrated terminal is the other usual culprit. Programs running there want Escape for themselves (vim, again). Click into an editor tab first, then press Esc Esc.

Exit Keybinding Removed or Remapped

In keybindings.json, a minus in front of a command name deletes that default binding. The documentation shows the pattern.

So if someone (possibly you, a couple of years ago) added a rule like the one below, Esc Esc stays dead until the line is gone. A public keybindings gist on GitHub does exactly this: it removes the default escape escape exit binding and assigns alt+k instead.

{ "key": "escape escape", "command": "-workbench.action.exitZenMode", "when": "inZenMode" }

To get the default back, delete that minus line or swap it for the rule below. The “Open Keyboard Shortcuts (JSON)” button in the Keyboard Shortcuts editor title bar opens the file.

{ "key": "escape escape", "command": "workbench.action.exitZenMode", "when": "inZenMode" }

Want a different key? Change only the key value. Leave the when clause alone so the shortcut stays inactive outside Zen Mode.

Why Is VSCode Still in Full Screen After Leaving Zen Mode?

Full screen belongs to the window, not to Zen Mode. Zen Mode just switches it on when it starts, through the zenMode.fullScreen setting, and leaving Zen Mode doesn’t always switch it back off. So you may need a second action.

On Windows and Linux that’s F11. On macOS it’s Ctrl+Cmd+F, and View: Toggle Full Screen in the Command Palette works on any system. The VS Code documentation lists F11 for View: Toggle Full Screen on Windows and Linux and Ctrl+Cmd+F on macOS.

The opposite can happen too. A GitHub report from April 2019 (issue 72936, filed against Code – Exploration 1.34.0) went like this: with zenMode.restore on, the reporter went full screen, entered Zen Mode, reloaded the window and then exited Zen Mode, and full screen dropped along with it.

A maintainer acknowledged the behavior. No fix was ever linked, though. The issue got labeled out of scope and closed in October 2019.

What you end up with after an exit depends on how you got into full screen and on your VSCode version. Look at the window rather than assuming.

If you’d rather Zen Mode never forced full screen in the first place, open your settings.json file with Preferences: Open User Settings (JSON) and add this line:

"zenMode.fullScreen": false

Watch the setting name. The November 2016 release notes called it window.fullScreenZenMode. Current documentation lists zenMode.fullScreen, and that’s the one to use.

Why Does Zen Mode Come Back After Restarting VSCode?

That’s zenMode.restore doing its job. It reopens Zen Mode on restart, and the current documentation lists its default as true.

Not every source agrees on that default. Back in January 2019, a VS Code team member replied in GitHub issue 67059 that Zen Mode is “not restored by default”. The current documentation (November 2026) says restore is on out of the box, and nobody explains the gap.

So check your own install. Run Preferences: Open Default Settings (JSON) and search for zenMode.

A couple of quirks make this harder to pin down. Zen Mode state is saved per workspace, so a folder must be open before the setting applies, according to a 2018 maintainer comment in GitHub issue 44652. (Another maintainer in the same thread said UI state is stored for empty windows too, so it’s not fully settled.) In practice Zen Mode can return in one project and stay off in another.

How you closed VSCode matters as well. A reporter in issue 67059 saw Zen Mode survive a system shutdown on Ubuntu 18.10 with the window open, but not a normal close with Alt+F4.

The fix is one line in settings.json:

"zenMode.restore": false

Still coming back? Look in the project. Workspace settings, stored in the project’s .vscode folder, take precedence over user settings, so a stray true in .vscode/settings.json beats your global false.

What Does Zen Mode Hide and Which Settings Control It?

Every Zen Mode setting starts with zenMode., and the table lists each one with its default in the current VS Code documentation (November 2026). Every row comes from the VS Code user interface documentation.

SettingDefaultEffect
zenMode.fullScreentrueFull screen display
zenMode.centerLayouttrueCentered editor layout
zenMode.showTabsmultipleMultiple, single or no editor tabs
zenMode.hideStatusBartrueHides the status bar
zenMode.hideActivityBartrueHides the activity bar
zenMode.hideLineNumberstrueHides line numbers
zenMode.restoretrueRestores Zen Mode on restart
zenMode.silentNotificationstrueStops notifications from displaying

You won’t find a zenMode.hideTabs in the current documentation. Tab visibility is handled by zenMode.showTabs instead.

Silent notifications keeps pop-ups quiet while you work, and honestly it’s the one I’d keep no matter what. On a wide monitor, though, you might want full-width lines, in which case set zenMode.centerLayout to false.

Change any of them in the Settings editor (Ctrl+, on Windows and Linux, Cmd+, on macOS) or write them into settings.json. This guide to VSCode settings goes through where each file lives.

Defaults do shift between releases. Confirm them on your build with Preferences: Open Default Settings (JSON) before you rely on the table.

Zen Mode in VSCode FAQ

What is Zen Mode in VSCode?

It hides every interface element except the editor, which makes it a distraction-free display mode. By default it also centers the editor and switches the window to full screen.

Is Zen Mode on by default?

No, it stays off until you toggle it. A VS Code team member said as much in a GitHub thread. It only returns after a restart if you closed VSCode while inside it and zenMode.restore applies.

How do you keep the status bar visible inside Zen Mode?

In settings.json, set zenMode.hideStatusBar to false. The activity bar works the same way through zenMode.hideActivityBar.

Both default to true. That’s why the bars vanish.

Is Centered Layout the same thing as Zen Mode?

Not really. Centered Layout only centers the editor area, which suits a single editor on a large monitor.

Zen Mode turns it on through zenMode.centerLayout (default true). Set that to false to keep full-width lines inside Zen Mode.

Which Zen Mode Defaults Are Worth Changing?

I’d set zenMode.restore and zenMode.fullScreen to false and leave the other six alone. Those two are behind every case where the exit gesture doesn’t finish the job.

Start with restore, because the sources disagree on its default. The full screen default has held for 10 years, from the November 2016 release notes to the current documentation, so there’s less mystery there. The hide settings can stay as they are.

There is a cost. With restore off, every restart opens a normal window and you have to toggle Zen Mode again. With full screen off, the window keeps its title bar and taskbar.

This advice was verified on November 20, 2026, and a release that changes the restore default would reverse the first step. For more shortcuts, a VSCode workflow cheat sheet is a sensible next stop.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.