Skip to content

feat(cinbase): make the Shift+Space full/half-shape hotkey optional (#844) - #1017

Open
asdf80730 wants to merge 1 commit into
EasyIME:masterfrom
asdf80730:omp/shift-space-option
Open

asdf80730 wants to merge 1 commit into
EasyIME:masterfrom
asdf80730:omp/shift-space-option

Conversation

@asdf80730

Copy link
Copy Markdown
Contributor

Fixes #844

速成 and the other cinbase input methods always claim Shift+Space as a
preserved key to toggle full/half shape, so a mistyped Shift while
switching Chinese and English silently flips the document into fullwidth
and there is no way to stop it — the option does not exist. The hotkey now
follows a new enableShiftSpace setting (named the same as the chewing
side's setting for the same key so one option reads the same across input
methods), on by default so nothing changes for existing users, with one
reconciler keeping the system registration in step with it.

  • Register the hotkey at activation only while the setting is on, and
    register/unregister it live when the option is switched mid-session, so
    a settings change takes effect without leaving and re-entering the
    input method; a config change made while inactive is applied on the
    next activation. Unregistered or refused, the combination falls through
    to the application as a plain space.

  • Add the checkbox to the settings tool's 行為設定 panel. The language-bar
    full/half-shape button keeps toggling the shape mode either way, and the
    eight shipped cinbase configs carry the key enabled.

  • 10 cases driving the real 速成 service through the preserved-key seam
    pass: registration by default, suppression when disabled, live
    register/unregister on a mid-session switch, no shape toggle when
    switched off, the language-bar button still working, activation applying
    an out-of-session config change, an old user config without the key
    keeping the hotkey, and the eight shipped configs staying on. The cases
    live in tests/test_cinbase_shift_space.py, which the repo's local
    verification harness runs; per docs/agents/upstream-pr.md regression
    tests are not shipped in the PR.

  • bash tests/verify_windows.sh all layers green (Python, Node, Go, Rust,
    C++ helpers, YAML).

Architecture and design by asdf80730. Implementation generated with AI
assistance from omp (Qwen3.8-Flash-Next).

…asyIME#844)

速成 and the other cinbase input methods always claim Shift+Space to
toggle full/half shape, so a mistyped Shift while switching Chinese and
English silently flips the whole document into fullwidth with no way to
turn the hotkey off. Follow the new enableShiftSpace setting (named the
same as the chewing side's option for the same key) with one reconciler:
activation registers the hotkey only when it is on, switching the option
mid-session registers or unregisters it at once, and re-activation picks
up a config changed while inactive. Unregistered or refused, the
combination falls through to the application as a plain space; the
language-bar full/half-shape button still toggles the shape mode either
way. Shipped configs keep the hotkey on so existing behaviour is the
default.

Validation:
- tests/test_cinbase_shift_space.py, 10 cases driving the real chesimplex
  service through the preserved-key seam (kept in the repo's local harness
  per docs/agents/upstream-pr.md): registration on by default, suppressed
  when disabled, live register/unregister on a mid-session switch, no
  toggle when switched off, the button path intact, activation applying an
  out-of-session config change, the old-config default, and the eight
  shipped configs.
- bash tests/verify_windows.sh: all layers green.

Architecture and design by asdf80730. Implementation generated with AI
assistance from omp (Qwen3.8-Flash-Next).

This branch has not been deployed

No deployments
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.

能否增加一個「取消 Shift+空白鍵 會切換成全型」的選項

1 participant