This module was developed with the assistance of Claude Code (Anthropic), an AI coding tool used throughout the project to write and refactor the TypeScript source, structure the Foundry module manifest and build configuration, and debug issues with window and keybinding behavior. All code was reviewed and tested by the author before release. The module contains no AI-generated user-facing content: no art, audio, or written narrative assets. It is a purely functional module that changes how the Escape key interacts with open application windows in Foundry VTT.
A module that makes the Escape key smarter about closing windows.
By default, Foundry's Escape key closes every open window simultaneously, including windows you've detached into their own separate browser window using v14's native window-detach feature. This module changes that, via two independently toggleable settings (Settings > Configure Settings > Keep Windows Open), both client-scoped so each player/GM sets their own preference:
- Protect Detached Windows (default: on): Escape will never close a window that's been detached into its own browser window.
- Close One Window at a Time (default: on): Escape closes only the single most-recently-active window instead of every open window at once.
With both settings off, Escape behaves exactly like vanilla Foundry.