[英]How can I create a special character shortcut for an IntelliJ plugin?
我想將快捷鍵ctrl + [
附加到我正在編寫的 IntelliJ 插件中的操作。
對於ctrl
加任何字母,這是有效的。 但是,對於方括號,這似乎不起作用。 我試過使用\\[
轉義。
例如,這不起作用:
<action id="DoTheThingAction" class="DoTheThingAction" text="Do It" description="Does The Thing">
<keyboard-shortcut first-keystroke="ctrl \[" keymap="$default" />
</action>
雖然這有效:
<action id="DoTheThingAction" class="DoTheThingAction" text="Do It" description="Does The Thing">
<keyboard-shortcut first-keystroke="ctrl w" keymap="$default" />
</action>
我需要做任何特殊的事情來為“[”這樣的特殊字符創建快捷方式嗎?
您不能直接使用[
或\\[
。 您需要使用OPEN_BRACKET
。
例如,這有效:
<action id="DoTheThingAction" class="DoTheThingAction" text="Do It" description="Does The Thing">
<keyboard-shortcut first-keystroke="ctrl OPEN_BRACKET" keymap="$default" />
</action>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.