Add shortcut to toggle line comments

Open 💬 0 comments Opened Aug 13, 2026 by rafaself

What variant of Codex are you using?

App

What feature would you like to see?

Add a keyboard shortcut to quickly comment and uncomment selected lines in the editor, similar to the behavior available in editors such as VS Code.

Currently, there does not appear to be a shortcut for toggling line comments in the Codex app editor. This makes a very common coding action slower, especially when temporarily disabling code or commenting multiple selected lines.

Most code editors provide a standard shortcut for this action, for example:

  • Ctrl + / on Linux/Windows
  • Cmd + / on macOS

Additional information

When one or more lines are selected, pressing the shortcut should toggle line comments using the appropriate comment syntax for the current language.

Examples:

// const foo = "bar";
# foo = "bar"

Pressing the shortcut again should uncomment the same lines.

Support a Toggle Line Comment command in the editor, ideally with:

  • Ctrl + / as the default shortcut on Linux/Windows
  • Cmd + / as the default shortcut on macOS
  • Support for commenting multiple selected lines
  • Language-aware comment syntax
  • Ability to customize the keybinding if configurable shortcuts are supported

Commenting and uncommenting code is a frequent editor operation, and supporting the conventional shortcut would make the Codex app feel more consistent with other development environments such as VS Code and reduce friction when editing code.

View original on GitHub ↗