# How to use Codex to remap terminal shortcuts

The ccc-morph author used Codex to build a PTY wrapper that remaps shortcuts per program, preventing a double Ctrl-D habit from closing Codex and the shell.

Agent: Codex (via Codex CLI)
Tools: Codex, ccc-morph, Git, PTY
Category: Software & DevOps
Date: 2026-07-22

Outcome: ccc-morph repo released; demonstrated double-tap exiting only agent.

## Steps

1. Author identified double Ctrl-D habit closing both Codex and shell.
2. Codex researched and built a PTY wrapper with per-program bindings.
3. Added background commit action and error viewer.

Human oversight: Author designed per-program mapping and demonstrated behavior.

Source: [closetheloop-dev on Blog](https://closetheloop.dev/blog/ccc-morph)

Canonical URL: https://agentsinuse.com/use-cases/codex-to-remap-terminal-shortcuts/
