如何为IntelliJ插件创建特殊字符快捷方式?

问题描述 投票:0回答:1

我想将快捷方式ctrl + [附加到我正在编写的IntelliJ插件中的操作上。

[ctrl加上任何字母,都可以。但是,对于方括号,这似乎不起作用。我尝试使用\[进行escpaing。

例如,这不起作用:

<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>

我需要做一些特殊的事情来为诸如“ [”之类的特殊字符创建快捷方式吗?

我想将快捷键ctrl + [附加到我正在编写的IntelliJ插件中的操作上。对于ctrl加上任何字母,都可以使用。但是,对于方括号,这似乎不起作用。我有...

intellij-idea plugins intellij-plugin
1个回答
0
投票

您不能直接使用[\[。您需要使用OPEN_BRACKET

© www.soinside.com 2019 - 2024. All rights reserved.