[PR #8156] fix: Allow ctrl+space to work as leader key #12641

Open
opened 2026-02-16 18:17:32 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8156

State: open
Merged: No


What does this PR do?

Closes #3657 (which should have been re-opened)

Summary

  • Normalize ParsedKey events so ctrl+space (NUL) and ctrl+_ map to named keys in one place, and simplify key parsing to rely on that normalization (packages/opencode/src/util/keybind.ts:13, packages/opencode/src/cli/cmd/tui/context/keybind.tsx:76).
  • Add a focused unit test that fails pre-fix by asserting NUL maps to ctrl+space (packages/opencode/test/keybind.test.ts:190).

How did you verify your code works?

Tested locally and added test for key detection. Test verified failing before src changes.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8156 **State:** open **Merged:** No --- ### What does this PR do? Closes #3657 (which should have been re-opened) Summary - Normalize ParsedKey events so ctrl+space (NUL) and ctrl+_ map to named keys in one place, and simplify key parsing to rely on that normalization (packages/opencode/src/util/keybind.ts:13, packages/opencode/src/cli/cmd/tui/context/keybind.tsx:76). - Add a focused unit test that fails pre-fix by asserting NUL maps to ctrl+space (packages/opencode/test/keybind.test.ts:190). ### How did you verify your code works? Tested locally and added test for key detection. Test verified failing before src changes.
yindo added the pull-request label 2026-02-16 18:17:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12641