fix: treat IME-committed ideographic space as the space key - #608
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: e65846a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
43081j
reviewed
Sep 21, 2026
Japanese, Chinese and other CJK IMEs can commit an ideographic space (U+3000) instead of U+0020 when the space key is pressed. Node readline reports it with no key name, so prompts never saw a space key and toggling multi-select options silently did nothing. Handle the unnamed ideographic space keypress in MultiSelectPrompt and GroupMultiSelectPrompt directly, so the raw character stays observable for consumers that want to detect U+3000 itself.
kai-natori
force-pushed
the
fix/ime-ideographic-space
branch
from
September 21, 2026 08:40
c83f17a to
97cf678
Compare
43081j
requested changes
Sep 22, 2026
Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
43081j
approved these changes
Sep 22, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Japanese (and other CJK) IMEs commit an ideographic space (
U+3000) instead ofU+0020when the space key is pressed. Node readline reports such keypresses with nokey.name, so prompts never see a space key — actions like toggling multiselect options silently do nothing while an IME is active.This PR normalizes a keypress whose
key.nameis undefined and whose committed char isU+3000toname: 'space'in the basePrompt.onKeypress, fixing the behavior for multiselect, group multiselect, autocomplete, and custom prompts. Text input is unaffected — the committed character still lands in the readline buffer as before.No linked issue — I ran into this directly while using clack-based prompts with Japanese IME input. Happy to file one if preferred.
Type of change
Checklist
pnpm testpasses (or targeted tests for my change)pnpm formathas been runAI-generated code disclosure