W3cubDocs

/Godot 3.0

ShortCut

Inherits: Resource < Reference < Object

Category: Core

Brief Description

A shortcut for binding input.

Member Functions

String get_as_text ( ) const
bool is_shortcut ( InputEvent event ) const
bool is_valid ( ) const

Member Variables

InputEvent shortcut - The Shortcut’s InputEvent.

Generally the InputEvent is a keyboard key, though it can be any InputEvent.

Description

A shortcut for binding input.

Shortcuts are commonly used for interacting with a Control element from a InputEvent.

Member Function Description

String get_as_text ( ) const

Returns the Shortcut’s InputEvent as a String.

bool is_shortcut ( InputEvent event ) const

Returns true if the Shortcut’s InputEvent equals event.

bool is_valid ( ) const

If true this Shortcut is valid.

© 2014–2018 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.0/classes/class_shortcut.html