Repository navigation
fix(input): 入力開始時に仮のマークドテキストを同期的に表示する - #379
Closed
shinespark wants to merge 15 commits into
Closed
shinespark wants to merge 15 commits into
shinespark wants to merge 15 commits into
Conversation
本家azooKeyと同時にインストールしても衝突しないよう、アプリ・テストのバンドルID、 App Group、ConverterServerのMachサービス名、入力モードIDを変更する。 UserDefaultsのキーはupstreamとのコンフリクトを減らすため変更しない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PRODUCT_NAMEをyuzKeyにして.app名を変え、インストール先やpkillの対象もそろえる。 @testable importが壊れないようにPRODUCT_MODULE_NAMEはazooKeyMacのまま固定する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ブランディングをyuzKeyに変更する
新しいSwiftPMはresource bundleをContents/Info.plistつきで生成する。直下にもInfo.plistを 置くとbundleの構造が不正になり、archive時のcodesignが失敗していた。 また、前回のビルドで置いたファイルが残らないよう、コピー前に埋め込み先を削除する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…undle ConverterServerのresource bundleに署名できない問題を直す
設定の「キーボード配列」に「候補選択キー」を追加し、1〜9とaoeuidhtnを切り替えられるようにする。 aoeuidhtnを選ぶと、候補選択中は修飾キーなしのa/o/e/u/i/d/h/t/nで1〜9番目の候補を確定し、 候補ウィンドウの番号表示もそれらの文字に変える。数字キーは候補を確定せず入力を続ける。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
候補選択キーの設定にasdfghjklを追加する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
キーボードのホーム段で候補を選べるようにする
group.接頭辞のApp Groupはプロビジョニングプロファイルでの許可が必要だが、自動署名で作られる ワイルドカードのプロファイルは許可しないため、設定を読み書きできず、ConverterServerも 起動を拒否されていた。macOSではTeam ID接頭辞のApp Groupならプロファイルが要らない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
同梱のllama.cppがmacOS 27のMetalで初期化に失敗し、Zenzaiのモデルを読み込んだ時点で ConverterServerがabortしていた。GPUを使わないZenzaiCPUトレイトにして、Metalを初期化しないようにする。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App GroupをTeam ID接頭辞の識別子に変更する
ZenzaiをCPUで推論するZenzaiCPUトレイトに切り替える
ConverterServerの応答は非同期のため、handleが返る時点ではマークドテキストが 空のままになる。Ghosttyなどはその間に生のキーをアプリへ送るため、ひらがな入力の 1文字目のアルファベットが確定されていた。入力開始キーでは入力文字を仮の マークドテキストとして同期的に設定する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Opened against the wrong repository by mistake. Sorry for the noise. |
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.
概要
ターミナル(Ghostty など)でひらがな入力をすると、入力し始めの 1 文字目のアルファベットが余計に確定される問題を直します。
原因
プロセス分離(XPC 化)以降、
handleはキーを同期的に消費しますが、マークドテキストは ConverterServer の応答後に非同期で設定されます。keyDown の処理中に IME がマークドテキストも insertText も設定しないと、一部のクライアントは生のキーをそのまま送ります。そのため、合成開始の 1 文字目だけが英字として漏れていました。変更内容
ConverterClientEventRouter.provisionalMarkedTextを追加しました。入力状態が空で、応答待ちのキーがなく、合成を始めるキーのときに、入力文字を返しますhandleで、ConverterServer へ送る前にこの文字列を仮のマークドテキストとして同期的に設定します。応答が届くと正式なマークドテキストで置き換わります確認方法
swift test --filter ConverterClientEventRouterTestsが通ることを確認済みです🤖 Generated with Claude Code