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...
Input¶
Inherits: Object
A singleton for handling inputs.
Description¶
The Input singleton handles key presses, mouse buttons and movement, gamepads, and input actions. Actions and their events can be set in the Input Map tab in Project > Project Settings, or with the InputMap class.
Note: Input's methods reflect the global input state and are not affected by Control.accept_event or Viewport.set_input_as_handled, as those methods only deal with the way input is propagated in the SceneTree.
Tutorials¶
Properties¶
Methods¶
void |
action_press ( StringName action, float strength=1.0 ) |
void |
action_release ( StringName action ) |
void |
add_joy_mapping ( String mapping, bool update_existing=false ) |
void |
|
get_accelerometer ( ) const |
|
get_action_raw_strength ( StringName action, bool exact_match=false ) const |
|
get_action_strength ( StringName action, bool exact_match=false ) const |
|
get_axis ( StringName negative_action, StringName positive_action ) const |
|
get_current_cursor_shape ( ) const |
|
get_gravity ( ) const |
|
get_gyroscope ( ) const |
|
get_joy_axis ( int device, JoyAxis axis ) const |
|
get_joy_guid ( int device ) const |
|
get_joy_info ( int device ) const |
|
get_joy_name ( int device ) |
|
get_joy_vibration_duration ( int device ) |
|