fix: 未定義のCtrl+キーの組み合わせをIMEで処理しないようにする#310
Merged
ensan-hcl merged 1 commit intoazooKey:mainfrom Apr 12, 2026
Merged
Conversation
Ctrl+`など、IMEで明示的に処理していないCtrl+キーの組み合わせが 全角文字として入力されてしまう問題を修正。
ensan-hcl
approved these changes
Apr 12, 2026
Member
ensan-hcl
left a comment
There was a problem hiding this comment.
たぶん問題ないのでマージするのですが、何か問題が起きたらrevertしちゃうかもです!
Contributor
Author
|
ctrl全部を.unknownにしているので,副作用あるかもなので大丈夫です! |
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.
概要
azookey(日本語)を使用時に、Ctrl+`など、IMEで明示的に処理していないCtrl+キーの組み合わせが全角文字として入力されてしまう問題を修正しました。
背景
具体例として、VSCodeにはCtrl + ` (バッククォート) でターミナルの表示/非表示を切り替えできるショートカットがありますが、azooKey(日本語)を使用時に、ターミナルがトグルできずに`(バッククォート)が入力されてしまいます。(動画参照)
これは、macOS標準の日本語IME使用時には発生せず、他のアプリのショートカットでも問題となる可能性があります。
default.mov
原因
UserAction.getUserAction()において、Ctrl+キーの組み合わせのうち明示的に処理していないもの(Ctrl+H, Ctrl+Pなど以外)が、defaultケースに到達し.input()として処理されていました。これによりアプリにショートカットが渡らなくなっていました。
変更内容
UserAction.swiftの論理キー判定部分で、明示的に処理しているCtrl+キーの個別ケースの直後に、Controlを含む未定義の組み合わせを.unknownとして返すケースを追加Test plan
swift test --package-path Coreが全テストパス./install.shでビルド&インストール後、VSCodeでCtrl+`によるターミナルトグルが動作することを確認(下記動画参照)2.mov
久しぶりにswiftを読み書きしたので、修正点等あれば遠慮なく指摘してください。よろしくお願いします。