feat(keymap): add option to disable command mode on Escape
Draft
AM
4mo ago+18+18+01234567890123456789-2-2-0123456789
This pull request was authored by a coding agent.
Summary
Adds a new enter_command_mode_on_escape configuration option to the keymap settings, allowing users to disable the Escape key from entering command mode in the cell editor.
This addresses the issue where users' muscle memory expects Escape to clear hint popups (like autocomplete or signature help) rather than navigate to command mode.
Changes
- Added
enter_command_mode_on_escape: NotRequired[bool]to backendKeymapConfiginmarimo/_config/config.py - Added corresponding field to frontend config schema in
config-schema.ts - Updated navigation logic in
navigation.tsto respect the config option - Regenerated OpenAPI spec and TypeScript types
Usage
Users can set this in their marimo config (e.g., ~/.marimo.toml):
[keymap]
enter_command_mode_on_escape = false
Default is true (existing behavior preserved).
Test plan
- Backend config tests pass (
pytest tests/_config/) - Frontend typecheck passes (
make fe-typecheck) - Python checks pass (
make py-check) - OpenAPI codegen successful (
make fe-codegen)
Closes #7426