Version: 2023.1

ClutchShortcutAttributeConstructor

切换到手册
public ClutchShortcutAttribute (string id, Type context= null);
public ClutchShortcutAttribute (string id, Type context, KeyCode defaultKeyCode, ShortcutManagement.ShortcutModifiers defaultShortcutModifiers= None);
public ClutchShortcutAttribute (string id, KeyCode defaultKeyCode, ShortcutManagement.ShortcutModifiers defaultShortcutModifiers= None);
public ClutchShortcutAttribute (string id, Type context, string tag, KeyCode defaultKeyCode, ShortcutManagement.ShortcutModifiers defaultShortcutModifiers= None);
public ClutchShortcutAttribute (string id, Type context, string tag, KeyCode defaultKeyCode, ShortcutManagement.ShortcutModifiers defaultShortcutModifiers= None, int priority);

参数

id 快捷方式 ID。
context 可选快捷方式上下文类型。
defaultKeyCode 默认绑定的可选键代码。
defaultShortcutModifiers 默认绑定的可选快捷方式修改键。
tag Optional custom context used to filter shortcuts after window context is determined.
priority Optional priority for adjusting order position in Helper Bar.

描述

使用 ID、可选上下文和可选默认绑定为控制快捷方式 创建属性。

控制快捷方式在快捷方式的绑定被按下和释放时触发。此属性所属的方法必须采用 ShortcutArguments 类型的单个参数。

ID 用于在配置界面中显示快捷方式。在配置界面中使用前向斜杠可将多个快捷方式组合在一起,例如 "MyWindow/Shortcut1" 和 "MyWindow/Shortcut2"。