-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
どのエディターでも実行されるショートカットアクションを登録できる関数を作る #2024
Comments
やります! |
3b0ed98 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
内容
ホットキーを使ったショートカットアクションの登録は
registerHotkeyWithCleanup
で行われています。voicevox/src/plugins/hotkeyPlugin.ts
Line 25 in cfaed56
ソングとトークのエディターを指定し、そのエディター内でのみショートカットが発動するようになっています。
ソングとトークどちらでもショートカットが起動してほしい場合は、両方のエディターを指定する必要があります。
例:https://github.com/VOICEVOX/voicevox/pull/2023/files
これを、両方のエディターを指定しなくても、つまりどこからでもショートカットキーが発動できるような関数を作りたいです。
Pros 良くなる点
実装しやすくなる
実現方法
ここでスコープを指定することで、そのエディタ内でのみショートカットが発動するような仕組みになっています。
voicevox/src/plugins/hotkeyPlugin.ts
Line 193 in cfaed56
スコープを指定しなければどこでも発動するはず!
その他
リファクタリング募集中です 🙏
The text was updated successfully, but these errors were encountered: