Repository navigation
karabiner: Cmd単押しの英数・かな送信にモード条件を付け、ATOKの2度押し再変換を防ぐ - #8
Merged
Merged
Conversation
ATOKには「英数キー・かなキーを2度押すと直前の確定文字を再変換する」機能がある。 左右Cmd単押しで無条件に japanese_eisuu / japanese_kana を送っていたため、 すでにそのモードのままCmdを押すと2度押しと見なされ、確定済みの文字が再変換されていた。 - 左Cmd単押し: 入力モードが com.apple.inputmethod.Roman(ATOK英字)の時は英数キーを送らない - 右Cmd単押し: 入力モードが com.apple.inputmethod.Japanese(ATOKひらがな)の時はかなキーを送らない - それ以外は従来どおり送る 確認: `./install.sh karabiner` で配置後、Karabinerのログに Load と core_configuration is updated が出てエラーなし。 実打鍵で確定直後のCmd単押しによる再変換が起きないことを利用者が確認。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
目的
ATOK使用時に、確定直後に左右Cmdを単押しすると直前の確定文字が再変換される問題を止める。
原因
ATOKの「英数キー・かなキーの2度押し機能」(環境設定 → 入力・変換 → 入力補助)が、Karabinerの「Cmd単押しで無条件に英数・かなキーを送る」規則と組み合わさり、すでにそのモードのままCmdを押すと2度押しと見なされていた。再変換はTSM Document Access対応の入力欄だけで起きるため、アプリによって症状が出たり出なかったりした。
変更
.config/karabiner/karabiner.jsonの Cmd単押し規則(rev 4)にinput_source_unless条件を追加。input_mode_idがcom.apple.inputmethod.Roman(ATOK英字モード)の時はjapanese_eisuuを送らないinput_mode_idがcom.apple.inputmethod.Japanese(ATOKひらがなモード)の時はjapanese_kanaを送らないひらがな時の
input_mode_idはKarabiner-EventViewerのVariablesで実測、英字側はATOK36の Info.plist の登録値。確認
python3 -m json.toolでJSON構文を確認./install.sh karabinerで配置後、KarabinerのログにLoad .../karabiner.jsonとcore_configuration is updatedが出てエラーなし(再起動後も同様)./lint.shの失敗1件(tmux isolated tests の sidebar version)は変更前のmainでも同じで本変更と無関係🤖 Generated with Claude Code