InputEventKey Properties |
The InputEventKey type exposes the following members.
Name | Description | |
---|---|---|
Alt | State of the Alt modifier. | |
Command | State of the Command modifier. | |
Control | State of the Ctrl modifier. | |
Device | The event's device ID. Note: This device ID will always be -1 for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. | |
DynamicObject |
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.) | |
Echo | If true, the key was already pressed before this event. It means the user is holding the key down. | |
Meta | State of the Meta modifier. | |
NativeInstance | (Inherited from Object.) | |
Pressed | If true, the key's state is pressed. If false, the key's state is released. | |
ResourceLocalToScene | If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene. | |
ResourceName | The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor. | |
ResourcePath | The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. | |
Scancode | The key scancode, which corresponds to one of the KeyList constants. To get a human-readable representation of the InputEventKey, use OS.get_scancode_string(event.scancode) where event is the InputEventKey. | |
Shift | State of the Shift modifier. | |
Unicode | The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See SetImeActive(Boolean) for more information. |