Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Shortcut
继承: Resource < RefCounted < Object
用于绑定输入的快捷键。
描述
Shortcuts are commonly used for interacting with a Control element from an InputEvent (also known as hotkeys).
One shortcut can contain multiple InputEvents, allowing the possibility of triggering one action with multiple different inputs.
属性
|
方法
get_as_text() const |
|
has_valid_event() const |
|
matches_event(event: InputEvent) const |
属性说明
快捷键的 InputEvent 数组。
通常使用的 InputEvent 是 InputEventKey,尽管也可以是任何 InputEvent,包括 InputEventAction。
方法说明
返回该快捷键的第一个有效 InputEvent 的 String 形式。
bool has_valid_event() const 🔗
返回 events 是否包含有效的 InputEvent。
bool matches_event(event: InputEvent) const 🔗
Returns whether any InputEvent in events equals event
. This uses InputEvent.is_match to compare events.