bug: 'z' is unconditionally swallowed in Windsurf Cascade chat input due to z-prefix list-fold chord
Summary
Pressing the letter z in the Cascade chat input box of Windsurf (a VS Code fork by Exafunction/Codeium) is silently swallowed. The status bar shows:
(Z) was pressed. Waiting for second key of chord...
…and z never types unless the user happens to chord into one of vscode-neovim's tree-fold commands. Every other letter types normally — confirming this is chord-specific, not a vim normal-mode issue.
Root cause
package.json registers 8 z-prefix list-fold chord bindings, all scoped with:
"when": "!editorTextFocus && !inputFocus"This is a sensible scope for tree-fold shortcuts (only fire when no editor/input has focus, i.e. when the file explorer or another tree view is focused). However, Windsurf's Cascade chat input is a custom widget (built via @exa/chat-client, not VS Code's standard chat infrastructure) that does not propagate focus to either editorTextFocus or inputFocus when focused. So !editorTextFocus && !inputFocus evaluates to true inside the Cascade chat input, and the chord activates — eating z.
This is ultimately a Windsurf bug — they should set the standard context keys. See cross-filed report at Exafunction/codeium: https://github.com/Exafunction/codeium/issues/320.
But a defensive when-clause exclusion in vscode-neovim would un-break Vim users on Windsurf today (and likely on other forks with similar custom chat widgets — Cursor, Trae, etc.).
Steps to reproduce
- Install latest Windsurf (1.110.1 confirmed).
- Install vscode-neovim 1.18.24.
- Open the Cascade chat panel.
- Click into the chat input.
- Press
z. - Observe: status bar shows
(Z) was pressed. Waiting for second key of chord.... Nozis typed. - Pressing any other letter (
a,b,i,o, etc.) types normally.
Affected bindings
All 8 of these in package.json:
| key | command |
|---|---|
z o |
list.expand |
z shift+o |
list.expand |
z c |
list.collapse |
z shift+c |
list.collapseAllToFocus |
z a |
list.toggleExpand |
z shift+a |
list.toggleExpand |
z m |
list.collapseAll |
z shift+m |
list.collapseAll |
Proposed fix (defensive)
The cleanest defensive exclusion is to detect the host fork via vscode.env.appName and either skip the chord registration or augment the when clause when running in Windsurf/forks that don't propagate inputFocus. This relates to existing issue #2496 (expose vscode.env.appName in vim.g.vscode).
Alternatively, augment the when clause to exclude any context key that VS Code forks commonly set on their custom chat inputs. The exact key isn't standardized, but Windsurf does declare chatInputHasFocus and inChatInput context keys (inherited from VS Code's stock chat) — though empirical testing shows neither is actually toggled by Cascade. So a when augmentation alone is insufficient until Windsurf sets a key.
Net: this issue is about awareness, and the practical fix is probably to:
- Pursue #2496 (fork detection) so vscode-neovim can apply Windsurf-specific compatibility shims.
- Track resolution at the Windsurf side: https://github.com/Exafunction/codeium/issues/320.
Workaround for users hitting this today
Add to keybindings.json (Windsurf or any affected fork):
[
{ "key": "z o", "command": "-list.expand" },
{ "key": "z shift+o", "command": "-list.expand" },
{ "key": "z c", "command": "-list.collapse" },
{ "key": "z shift+c", "command": "-list.collapseAllToFocus" },
{ "key": "z a", "command": "-list.toggleExpand" },
{ "key": "z shift+a", "command": "-list.toggleExpand" },
{ "key": "z m", "command": "-list.collapseAll" },
{ "key": "z shift+m", "command": "-list.collapseAll" }
]This unconditionally disables the chords (cost: tree-fold shortcuts in the file explorer no longer work — most users never use these intentionally).
Conditional negation (e.g., "when": "chatInputHasFocus || inChatInput") does not work — Windsurf does not toggle those keys on the Cascade input either. Verified empirically.
Environment
- Windsurf: 1.110.1 (commit
08b5de9b…, 2026-04-22) - vscode-neovim: 1.18.24
- Neovim: NVIM v0.11.6
- macOS: Sonoma (Apple Silicon)
Related
- #2496 — expose
vscode.env.appNameto detect VS Code fork (would enable a clean compatibility shim for Windsurf and similar forks) - Cross-filed at Windsurf: https://github.com/Exafunction/codeium/issues/320
Source: vscode-neovim/vscode-neovim