Skip to content

Commit 1f1ed0f

Browse files
committed
fix(container): unbind zsh Alt+W and Alt+Q keybinds
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.
1 parent 02c24f2 commit 1f1ed0f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

container/.devcontainer/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Terminal
66

7-
- **Shell terminal keybinds hardened** — disabled `Ctrl+Z` (suspend, which closes Docker-attached panes), `Ctrl+S/Q` (flow control freeze), and `Ctrl+W` (conflicts with Windows Terminal close-tab). Rebound `Ctrl+\` (SIGQUIT) to `Ctrl+]` and `Ctrl+D` (EOF) to `Ctrl+^` as emergency-only alternatives.
7+
- **Shell terminal keybinds hardened** — disabled `Ctrl+Z` (suspend, which closes Docker-attached panes), `Ctrl+S/Q` (flow control freeze), and `Ctrl+W` (conflicts with Windows Terminal close-tab). Rebound `Ctrl+\` (SIGQUIT) to `Ctrl+]` and `Ctrl+D` (EOF) to `Ctrl+^` as emergency-only alternatives. Also unbound zsh's `Alt+W` (copy-region-as-kill) and `Alt+Q` (push-line) to free those keys for terminal use.
88

99
### Hermes Agent
1010

container/.devcontainer/scripts/setup-aliases.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ stty werase undef # Kill Ctrl+W — conflicts with Windows Terminal close-tab
117117
stty quit '^]' # Rebind Ctrl+\ (SIGQUIT) → Ctrl+] (emergency only)
118118
stty eof '^^' # Rebind Ctrl+D (EOF) → Ctrl+^ (emergency only)
119119
# zsh bindkey cleanup — stty handles the terminal layer, but zsh's line
120-
# editor has its own Ctrl+W binding that bypasses stty
120+
# editor has its own bindings that bypass stty or conflict with pane hotkeys
121121
if [ -n "\$ZSH_VERSION" ]; then
122-
bindkey -r '^W' # Remove backward-kill-word (stty werase already disabled)
122+
bindkey -r '^W' # Remove backward-kill-word (stty werase already disabled)
123+
bindkey -r '^[w' # Remove copy-region-as-kill (unused emacs kill-ring op)
124+
bindkey -r '^[q' # Remove push-line (niche; frees Alt+Q for terminal use)
123125
fi
124126
125127
# Native binary (installed by claude-code-native feature)

0 commit comments

Comments
 (0)