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

参数

id快捷方式 ID。
context可选快捷方式上下文类型。
defaultKeyCode默认绑定的可选键代码。
defaultShortcutModifiers默认绑定的可选快捷方式修改键。

描述

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

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

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