Repository navigation
Conversation
…t jamo to the physical letter With the Korean (2-Set) input source active, terminals report Ctrl+K as Ctrl+ㅏ and Cmd+B as Cmd+ㅠ, so every letter keybinding (readline edits, Cmd+B resume, configured chords) silently missed and Cmd chords neither fired nor typed. All key entry points (local, disconnected, remote, scroll-key probe) now fold a jamo under a Ctrl/Alt/Cmd/Meta/Hyper chord to the US-QWERTY letter on the same physical key; plain jamo typing is untouched. Tested: cargo test -p jcode-tui-core dubeolsik (1 passed); cargo test -p jcode-tui korean_jamo (3 passed; 2 fail with the fold removed); cargo test -p jcode-tui -p jcode-tui-core: 2465 passed, 2 failed (test_prompt_entry_shimmer_color_moves_across_positions also fails on base e46eff2; test_restore_reload_state_supports_legacy_input_format passes 3/3 in isolation, a shared-file parallel flake); cargo clippy -p jcode-tui -p jcode-tui-core --all-targets -D warnings exit 0
|
Greptile review on 1jehuang#1727: voice shortcut interception ran on the raw key before the per-handler Hangul fallback, so Ctrl+ㅠ never started or released voice recording. Normalize the KeyEvent once where each loop reads it (local, remote connected/disconnected, turn loops, session picker) and drop the per-handler fallbacks. Tests drive the normalized event path.
|
Addressed both review points in 87357f4:
|
Move the two-set chord normalization to tui-core so terminal entry points share one implementation, and flatten existing dispatch branches rather than enlarging oversized files. Tested: cargo test -p jcode-tui-core korean_input; cargo test -p jcode-tui korean_jamo --lib; cargo test -p jcode-tui korean_typing --lib; cargo clippy -p jcode-tui -p jcode-tui-core --all-targets -- -D warnings; cargo fmt --package jcode-tui-core --package jcode-tui -- --check; python3 scripts/check_code_size_budget.py; git diff --check (all passed)
|
CI follow-up at head f93a1de: |
Exercise connected and disconnected handlers with a TestBackend, preserve plain jamo entry, and move local chord tests out of an oversized test file. Keep both repository size ratchets flat. Tested: cargo test -p jcode-tui korean_input --lib (5 passed); cargo test -p jcode-tui voice_chord --lib (1 passed); cargo clippy -p jcode-tui -p jcode-tui-core --all-targets -- -D warnings; cargo fmt --all -- --check; scripts/check_module_files.py; scripts/check_test_size_budget.py; scripts/check_code_size_budget.py (all passed)
Closes #1738
Problem
With macOS Korean 2-Set active, terminal key events for Jcode-owned modified shortcuts can carry jamo rather than Latin letters, such as Ctrl+ㅏ instead of Ctrl+K or Cmd+ㅠ instead of Cmd+B. Shortcut dispatch misses those events. Terminal-owned actions such as Ghostty Cmd+V need the terminal physical-key binding and are outside this PR.
Fix
Normalize only Korean 2-Set jamo with Ctrl, Alt, Super, Meta, or Hyper to the Latin letter on the same key before Jcode shortcut and voice dispatch. Keep plain Korean input unchanged. The map and normalizer now live together in jcode-tui-core::korean_input, shared by local, remote, disconnected and picker paths. Existing oversized dispatch files remain within the repository code-size budget without raising its baseline.
Verification
No installed Jcode sessions were changed. No upstream merge requested.