Skip to content

Configurable Hotkeys Support #3049

@pidgeon777

Description

@pidgeon777

What feature would you like to see?

It would be highly valuable to introduce configurable hotkeys in Codex. Currently, key bindings such as Ctrl+J, Ctrl+H, etc., are hardcoded. Allowing users to customize these shortcuts would greatly improve accessibility and workflow efficiency across different environments and personal preferences.

How it could be implemented:

  • Add a section (e.g., [keybindings]) to the existing config.toml file, where users can specify custom bindings for actions like 'newline', 'backspace', etc.
  • At runtime, Codex would read this configuration and dynamically map keyboard events to user-defined actions.
  • Provide clear documentation and examples for supported key names and modifier combinations (Ctrl, Alt, Shift, Enter, single characters).

Example config.toml section:

[keybindings]
newline = "Ctrl+J"
backspace = "Ctrl+H"
move_left = "Ctrl+B"

This feature would make Codex more flexible and user-friendly, especially for users with specific accessibility needs or those coming from different editor backgrounds.

Are you interested in implementing this feature?

I am interested in helping discuss the design, but may not have time to implement. Please coordinate before starting a PR.

Additional information

This approach could also pave the way for future extensibility, such as per-profile or per-mode bindings, and easier adaptation to international keyboards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions