Skip to content

fix(container): harden shell terminal keybinds for Docker-attached panes#81

Merged
AnExiledDev merged 2 commits intostagingfrom
fix/terminal-keybind-hardening
Apr 29, 2026
Merged

fix(container): harden shell terminal keybinds for Docker-attached panes#81
AnExiledDev merged 2 commits intostagingfrom
fix/terminal-keybind-hardening

Conversation

@AnExiledDev
Copy link
Copy Markdown
Owner

@AnExiledDev AnExiledDev commented Apr 29, 2026

Summary

  • Disabled problematic terminal signalsCtrl+Z (suspend, closes Docker-attached panes), Ctrl+S/Q (flow control freeze), Ctrl+W (conflicts with Windows Terminal close-tab)
  • Rebound SIGQUIT and EOFCtrl+\Ctrl+] and Ctrl+DCtrl+^ as emergency-only alternatives
  • zsh-specific cleanup — conditional bindkey -r to remove zsh line-editor bindings that bypass stty: Ctrl+W (backward-kill-word), Alt+W (copy-region-as-kill), Alt+Q (push-line)

All config lives in the managed block in setup-aliases.sh — idempotent, rewritten on every container start.

Test plan

  • Open a terminal in the container (VS Code or docker exec)
  • Run stty -a — verify susp = <undef>, werase = <undef>, quit = ^\], eof = ^\^, no ixon
  • Press Ctrl+Z — nothing should happen
  • Press Ctrl+S — terminal should NOT freeze
  • Press Ctrl+W — should NOT delete a word
  • Press Alt+W — nothing should happen (zsh)
  • Press Alt+Q — nothing should happen (zsh)
  • Press Ctrl+^ — sends EOF (in cat, terminates input)
  • Press Ctrl+] — sends SIGQUIT (in cat, shows ^\)
  • Verify Ctrl+C still works (SIGINT unaffected)

Disable signals that cause problems in Docker-attached terminals:
Ctrl+Z (suspend closes pane), Ctrl+S/Q (flow control freeze),
Ctrl+W (Windows Terminal close-tab conflict). Rebind SIGQUIT and
EOF to esoteric combos for emergency use.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5c130fd-f140-428e-bf08-5a6e70284cf5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/terminal-keybind-hardening

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Alt+W (copy-region-as-kill) and Alt+Q (push-line) are unused emacs
line-editor operations that occupy useful Alt key slots. Removed
alongside the existing Ctrl key hardening.
@AnExiledDev AnExiledDev merged commit 0cd2973 into staging Apr 29, 2026
7 of 8 checks passed
@AnExiledDev AnExiledDev deleted the fix/terminal-keybind-hardening branch April 29, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant