Skip to content

fix(tui): ignore lock/private-use key events in text inputs#16324

Open
danix800 wants to merge 1 commit intoanomalyco:devfrom
danix800:fix/tui-lock-privateuse-input-filter
Open

fix(tui): ignore lock/private-use key events in text inputs#16324
danix800 wants to merge 1 commit intoanomalyco:devfrom
danix800:fix/tui-lock-privateuse-input-filter

Conversation

@danix800
Copy link

@danix800 danix800 commented Mar 6, 2026

Issue for this PR

Closes #16310

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

VS Code 1.110 started reporting CapsLock through kitty keyboard protocol in a way that surfaced as private-use text (U+E00E) in OpenCode TUI inputs.

This PR adds a shared input guard that blocks lock keys (capslock, numlock, scrolllock) and private-use Unicode key events from being inserted as text. It wires the guard into all editable TUI text inputs used in prompts and dialogs, and adds tests for both BMP and supplementary private-use code points.

How did you verify your code works?

  • Reproduced locally in VS Code integrated terminal: CapsLock no longer inserts stray characters.
  • Ran bun run typecheck in packages/opencode.
  • Ran bun test test/cli/tui in packages/opencode.

Screenshots / recordings

N/A (TUI input handling change).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

macOS: CapsLock IME toggle inserts U+E00E in VS Code 1.110 integrated terminal

1 participant