class Godot::Input

Overview

=========================================================================== Input Delegators

Defined in:

libgodot/extensions/input.cr
libgodot/generated/classes/classes_part3.cr
libgodot/generated/singletons.cr
libgodot/object.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Godot::Object

==(other : Godot::Object) : Bool
==(other : Nil) : Bool
==
, _enter_tree : Void _enter_tree, _exit_tree : Void _exit_tree, _godot_call_tool_button(button_name : String) : Void _godot_call_tool_button, _godot_call_virtual(method_name : String, delta : Float64) : Void _godot_call_virtual, _godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void _godot_call_virtual_with_data, _godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void _godot_get_property, _godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void _godot_set_property, _physics_process(delta : Float64) : Void _physics_process, _process(delta : Float64) : Void _process, _ready : Void _ready, add_user_signal(signal : String, arguments : Pointer(Void)) : Void add_user_signal, alive? : Bool alive?, await_signal(signal_name : String, timeout_sec : Float64 | Nil = nil) : Array(Variant) await_signal, blocking_signals? : Bool blocking_signals?, call(method : String, *args) : Pointer(Void) call, call_bool(method : String, *args) : Bool call_bool, call_deferred(method : String, *args) : Pointer(Void) call_deferred, call_f64(method : String, *args) : Float64 call_f64, call_i64(method : String, *args) : Int64 call_i64, call_obj(method : String, *args) : Node | Nil call_obj, call_obj_as(type : T.class, method : String, *args) : T | Nil forall T call_obj_as, call_str(method : String, *args) : String call_str, callv(method : String, arg_array : Pointer(Void)) : Pointer(Void) callv, can_translate_messages : Bool can_translate_messages, can_translate_messages? : Bool can_translate_messages?, cancel_free : Void cancel_free, check_alive! : Void check_alive!, class?(godot_class : String) : Bool class?, connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, callback : Proc(Array(Variant), Void) | Nil = nil) : SignalSubscription
connect(signal_name : String, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None, &block : Array(Variant) -> Void) : SignalSubscription
connect(signal_name : String, listener_target : Godot::Object, method_name : Symbol, flags : Godot::ConnectFlags = ::Godot::ConnectFlags::None) : SignalSubscription
connect(signal : String, callable : Pointer(Void), flags : Int64 = 0_i64) : Godot::Error
connect
, connect_one_shot(signal_name : String, &block : Array(Variant) -> Void) : SignalSubscription connect_one_shot, connected?(signal : String, callable : Pointer(Void)) : Bool connected?, destroy : Void destroy, destroyed? : Bool destroyed?, disconnect(signal : String, callable : Pointer(Void)) : Void
disconnect(signal_name : String) : Void
disconnect
, editor_hint? : Bool editor_hint?, emit_property_list_changed : Void emit_property_list_changed, emit_script_changed : Void emit_script_changed, emit_signal(name : String) : Void
emit_signal(name : String, *args) : Void
emit_signal
, explicitly_freed? : Bool explicitly_freed?, free : Void free, get(property : String) : Pointer(Void) get, get_class : String get_class, get_incoming_connections : Pointer(Void) get_incoming_connections, get_indexed(property_path : NodePath | String) : Pointer(Void) get_indexed, get_instance_id : Int64 get_instance_id, get_meta(name : String, default : Pointer(Void) | Nil = nil) : Pointer(Void) get_meta, get_meta_list : Pointer(Void) get_meta_list, get_method_argument_count(method : String) : Int64 get_method_argument_count, get_method_list : Pointer(Void) get_method_list, get_property_list : Pointer(Void) get_property_list, get_script : Pointer(Void) get_script, get_signal_connection_list(signal : String) : Pointer(Void) get_signal_connection_list, get_signal_list : Pointer(Void) get_signal_list, get_translation_domain : String get_translation_domain, has_connections(signal : String) : Bool has_connections, has_connections?(signal : String) : Bool has_connections?, has_meta(name : String) : Bool has_meta, has_meta?(name : String) : Bool has_meta?, has_method(method : String) : Bool has_method, has_method?(method : String) : Bool has_method?, has_signal(signal : String) : Bool has_signal, has_signal?(signal_name : String) : Bool has_signal?, has_user_signal(signal : String) : Bool has_user_signal, has_user_signal?(signal : String) : Bool has_user_signal?, hash(hasher) hash, if_alive : self | Nil if_alive, instance_id : UInt64 instance_id, is_blocking_signals : Bool is_blocking_signals, is_blocking_signals? : Bool is_blocking_signals?, is_class(godot_class : String) : Bool is_class, is_class?(godot_class : String) : Bool is_class?, is_connected(signal : String, callable : Pointer(Void)) : Bool is_connected, is_connected?(signal : String, callable : Pointer(Void)) : Bool is_connected?, is_queued_for_deletion : Bool is_queued_for_deletion, is_queued_for_deletion? : Bool is_queued_for_deletion?, is_valid? : Bool is_valid?, link_class_script : Void link_class_script, notification(what : Int64, reversed : Bool = false) : Void notification, notify_property_list_changed : Void notify_property_list_changed, pointer : Pointer(Void) pointer, pointer=(val : Pointer(Void)) pointer=, print(*args) print, printerr(*args) printerr, property_can_revert(property : String) : Bool property_can_revert, property_can_revert?(property : String) : Bool property_can_revert?, property_get_revert(property : String) : Pointer(Void) property_get_revert, property_list_changed : Godot::TypedSignal() property_list_changed, puts(*args) puts, queued_for_deletion? : Bool queued_for_deletion?, remove_meta(name : String) : Void remove_meta, remove_user_signal(signal : String) : Void remove_user_signal, script_changed : Godot::TypedSignal() script_changed, set(property : String, value : Pointer(Void)) : Void set, set_block_signals(enable : Bool) : Void set_block_signals, set_deferred(property : String, value : Pointer(Void)) : Void set_deferred, set_indexed(property_path : NodePath | String, value : Pointer(Void)) : Void set_indexed, set_message_translation(enable : Bool) : Void set_message_translation, set_meta(name : String, value : Pointer(Void)) : Void set_meta, set_script(script : Pointer(Void)) : Void set_script, set_translation_domain(domain : String) : Void set_translation_domain, signal(name : String) : Godot::BoundSignal
signal(sym : Symbol) : Godot::BoundSignal
signal
, signal_connection_count(signal_name : String) : Int32 signal_connection_count, signal_target_id : UInt64 signal_target_id, to_s(io : IO) : Void to_s, to_string : String to_string, to_unsafe : Pointer(Void) to_unsafe, tr(message : String, context : String = "") : String tr, tr_n(message : String, plural_message : String, n : Int64, context : String = "") : String tr_n

Constructor methods inherited from class Godot::Object

new(pointer : Pointer(Void) = Pointer(Void).null) new

Class methods inherited from class Godot::Object

_godot_has_virtual_method(method_name : String) : Bool _godot_has_virtual_method, find_script_path_for_class(target_cls : String) : String find_script_path_for_class, is_instance_id_valid(id : Int | UInt64) : Bool is_instance_id_valid

Constructor Detail

def self.instance : Input #

def self.new(pointer : Pointer(Void) = Pointer(Void).null) #

Class Method Detail

def self.action_just_pressed?(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.action_just_pressed?(*args, **kwargs) #

def self.action_just_released?(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.action_just_released?(*args, **kwargs) #

def self.action_pressed?(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.action_pressed?(*args, **kwargs) #

def self.axis(negative_action : String, positive_action : String) : Float32 #

def self.axis(*args, **kwargs) #

def self.get_vector(negative_x : String, positive_x : String, negative_y : String, positive_y : String, deadzone : Float64 = -1.0) : Vector2 #

def self.get_vector(*args, **kwargs) #

def self.is_action_just_pressed(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_action_just_released(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_action_pressed(action : String | Symbol, exact_match : Bool = false) : Bool #

def self.is_key_pressed(key : Key | Int32 | Int64) : Bool #

def self.is_mouse_button_pressed(button : MouseButton | Int32 | Int64) : Bool #

def self.is_mouse_button_pressed(*args, **kwargs) #

def self.is_physical_key_pressed(key : Key | Int32 | Int64) : Bool #

def self.mouse_button_pressed?(button : MouseButton | Int32 | Int64) : Bool #

def self.mouse_button_pressed?(*args, **kwargs) #

def self.singleton_ptr : Pointer(Void) #

def self.use_accumulated_input #

def self.use_accumulated_input=(enable : Bool) : Void #

def self.use_accumulated_input=(val) #

Instance Method Detail

def action_just_pressed?(action : String | Symbol, exact_match : Bool = false) : Bool #

def action_just_pressed_by_event?(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_pressed_by_event


def action_just_released?(action : String | Symbol, exact_match : Bool = false) : Bool #

def action_just_released_by_event?(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_released_by_event


def action_press(action : String, strength : Float64 = 1.0) : Void #

def action_pressed?(action : String | Symbol, exact_match : Bool = false) : Bool #

def action_release(action : String) : Void #

def add_joy_mapping(mapping : String, update_existing : Bool = false) : Void #

def anything_pressed? : Bool #

Predicate alias for #is_anything_pressed


def axis(negative_action : String | Symbol, positive_action : String | Symbol) : Float32 #

def clear_joy_motion_sensors_calibration(device : Int64) : Void #

def emit_joy_connection_changed(*args) : Void #

def emulate_mouse_from_touch #

Property #emulate_mouse_from_touch getter


def emulate_mouse_from_touch=(val) #

Property #emulate_mouse_from_touch setter


def emulate_mouse_from_touch? #

def emulate_touch_from_mouse #

Property #emulate_touch_from_mouse getter


def emulate_touch_from_mouse=(val) #

Property #emulate_touch_from_mouse setter


def emulate_touch_from_mouse? #

def emulating_mouse_from_touch? : Bool #

Predicate alias for #is_emulating_mouse_from_touch


def emulating_touch_from_mouse? : Bool #

Predicate alias for #is_emulating_touch_from_mouse


def flush_buffered_events : Void #

def get_accelerometer : Vector3 #

def get_action_raw_strength(action : String, exact_match : Bool = false) : Float64 #

def get_action_strength(action : String, exact_match : Bool = false) : Float64 #

def get_axis(negative_action : String, positive_action : String) : Float64 #

def get_connected_joypads : Pointer(Void) #

def get_current_cursor_shape : CursorShape #

def get_device_orientation : Quaternion #

def get_gravity : Vector3 #

def get_gyroscope : Vector3 #

def get_joy_accelerometer(device : Int64) : Vector3 #

def get_joy_axis(device : Int64, axis : Godot::JoyAxis | Int) : Float64 #

def get_joy_gravity(device : Int64) : Vector3 #

def get_joy_guid(device : Int64) : String #

def get_joy_gyroscope(device : Int64) : Vector3 #

def get_joy_info(device : Int64) : Pointer(Void) #

def get_joy_motion_sensors_calibration(device : Int64) : Pointer(Void) #

def get_joy_motion_sensors_rate(device : Int64) : Float64 #

def get_joy_name(device : Int64) : String #

def get_joy_num_touchpads(device : Int64) : Int64 #

def get_joy_touchpad_finger_position(device : Int64, finger : Int64, touchpad : Int64 = 0_i64) : Vector2 #

def get_joy_touchpad_finger_pressure(device : Int64, finger : Int64, touchpad : Int64 = 0_i64) : Float64 #

def get_joy_touchpad_fingers(device : Int64, touchpad : Int64 = 0_i64) : Pointer(Void) #

def get_joy_vibration_duration(device : Int64) : Float64 #

def get_joy_vibration_remaining_duration(device : Int64) : Float64 #

def get_joy_vibration_strength(device : Int64) : Vector2 #

def get_last_mouse_screen_velocity : Vector2 #

def get_last_mouse_velocity : Vector2 #

def get_magnetometer : Vector3 #

def get_mouse_button_mask : Godot::MouseButtonMask #

def get_mouse_mode : MouseMode #

def get_vector(negative_x : String, positive_x : String, negative_y : String, positive_y : String, deadzone : Float64 = -1.0) : Vector2 #

def get_vector(negative_x : String | Symbol, positive_x : String | Symbol, negative_y : String | Symbol, positive_y : String | Symbol, deadzone : Float64 = -1.0) : Vector2 #

def has_joy_light(device : Int64) : Bool #

def has_joy_light?(device : Int64) : Bool #

Predicate alias for #has_joy_light


def has_joy_motion_sensors(device : Int64) : Bool #

def has_joy_motion_sensors?(device : Int64) : Bool #

Predicate alias for #has_joy_motion_sensors


def has_joy_vibration(device : Int64) : Bool #

def has_joy_vibration?(device : Int64) : Bool #

Predicate alias for #has_joy_vibration


def ignore_joypad_on_unfocused_application #

def ignore_joypad_on_unfocused_application=(val) #

def ignore_joypad_on_unfocused_application? #

def ignoring_joypad_on_unfocused_application? : Bool #

def is_action_just_pressed(action : String, exact_match : Bool = false) : Bool #

def is_action_just_pressed?(action : String, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_pressed


def is_action_just_pressed_by_event(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

def is_action_just_pressed_by_event?(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_pressed_by_event


def is_action_just_released(action : String, exact_match : Bool = false) : Bool #

def is_action_just_released?(action : String, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_released


def is_action_just_released_by_event(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

def is_action_just_released_by_event?(action : String, event : InputEvent, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_just_released_by_event


def is_action_pressed(action : String, exact_match : Bool = false) : Bool #

def is_action_pressed?(action : String, exact_match : Bool = false) : Bool #

Predicate alias for #is_action_pressed


def is_anything_pressed : Bool #

def is_anything_pressed? : Bool #

Predicate alias for #is_anything_pressed


def is_emulating_mouse_from_touch : Bool #

def is_emulating_mouse_from_touch? : Bool #

Predicate alias for #is_emulating_mouse_from_touch


def is_emulating_touch_from_mouse : Bool #

def is_emulating_touch_from_mouse? : Bool #

Predicate alias for #is_emulating_touch_from_mouse


def is_ignoring_joypad_on_unfocused_application : Bool #

def is_ignoring_joypad_on_unfocused_application? : Bool #

def is_joy_button_pressed(device : Int64, button : Godot::JoyButton | Int) : Bool #

def is_joy_button_pressed?(device : Int64, button : Godot::JoyButton | Int) : Bool #

Predicate alias for #is_joy_button_pressed


def is_joy_known(device : Int64) : Bool #

def is_joy_known?(device : Int64) : Bool #

Predicate alias for #is_joy_known


def is_joy_motion_sensors_auto_calibration_enabled(device : Int64) : Bool #

def is_joy_motion_sensors_auto_calibration_enabled?(device : Int64) : Bool #

def is_joy_motion_sensors_calibrated(device : Int64) : Bool #

def is_joy_motion_sensors_calibrated?(device : Int64) : Bool #

Predicate alias for #is_joy_motion_sensors_calibrated


def is_joy_motion_sensors_calibrating(device : Int64) : Bool #

def is_joy_motion_sensors_calibrating?(device : Int64) : Bool #

def is_joy_motion_sensors_enabled(device : Int64) : Bool #

def is_joy_motion_sensors_enabled?(device : Int64) : Bool #

Predicate alias for #is_joy_motion_sensors_enabled


def is_joy_vibrating(device : Int64) : Bool #

def is_joy_vibrating?(device : Int64) : Bool #

Predicate alias for #is_joy_vibrating


def is_key_label_pressed(keycode : Godot::Key | Int) : Bool #

def is_key_label_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_key_label_pressed


def is_key_pressed(keycode : Godot::Key | Int) : Bool #

def is_key_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_key_pressed


def is_mouse_button_pressed(button : MouseButton | Int32 | Int64) : Bool #

def is_mouse_button_pressed(button : Godot::MouseButton | Int) : Bool #

def is_mouse_button_pressed?(button : Godot::MouseButton | Int) : Bool #

Predicate alias for #is_mouse_button_pressed


def is_physical_key_pressed(keycode : Godot::Key | Int) : Bool #

def is_physical_key_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_physical_key_pressed


def is_using_accumulated_input : Bool #

def is_using_accumulated_input? : Bool #

Predicate alias for #is_using_accumulated_input


def joy_button_pressed?(device : Int64, button : Godot::JoyButton | Int) : Bool #

Predicate alias for #is_joy_button_pressed


def joy_connection_changed : Godot::TypedSignal(Int64, Bool) #

def joy_known?(device : Int64) : Bool #

Predicate alias for #is_joy_known


def joy_motion_sensors_auto_calibration_enabled?(device : Int64) : Bool #

def joy_motion_sensors_calibrated?(device : Int64) : Bool #

Predicate alias for #is_joy_motion_sensors_calibrated


def joy_motion_sensors_calibrating?(device : Int64) : Bool #

def joy_motion_sensors_enabled?(device : Int64) : Bool #

Predicate alias for #is_joy_motion_sensors_enabled


def joy_vibrating?(device : Int64) : Bool #

Predicate alias for #is_joy_vibrating


def key_label_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_key_label_pressed


def key_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_key_pressed


def mouse_button_pressed?(button : MouseButton | Int32 | Int64) : Bool #

def mouse_mode #

Property #mouse_mode getter


def mouse_mode=(val : Int) #

Property #mouse_mode setter


def parse_input_event(event : InputEvent) : Void #

def physical_key_pressed?(keycode : Godot::Key | Int) : Bool #

Predicate alias for #is_physical_key_pressed


def remove_joy_mapping(guid : String) : Void #

def set_accelerometer(value : Vector3) : Void #

def set_custom_mouse_cursor(image : Resource, shape : CursorShape | Int = 0, hotspot : Vector2 = Vector2.new(0.to_f32, 0.to_f32)) : Void #

def set_default_cursor_shape(shape : CursorShape | Int = 0) : Void #

def set_device_orientation(value : Quaternion) : Void #

def set_emulate_mouse_from_touch(enable : Bool) : Void #

def set_emulate_touch_from_mouse(enable : Bool) : Void #

def set_gravity(value : Vector3) : Void #

def set_gyroscope(value : Vector3) : Void #

def set_ignore_joypad_on_unfocused_application(enable : Bool) : Void #

def set_joy_light(device : Int64, color : Color) : Void #

def set_joy_motion_sensors_auto_calibration_enabled(device : Int64, enable : Bool) : Void #

def set_joy_motion_sensors_calibration(device : Int64, calibration_info : Pointer(Void)) : Void #

def set_joy_motion_sensors_enabled(device : Int64, enable : Bool) : Void #

def set_magnetometer(value : Vector3) : Void #

def set_mouse_mode(mode : MouseMode | Int) : Void #

def set_use_accumulated_input(enable : Bool) : Void #

def should_ignore_device(vendor_id : Int64, product_id : Int64) : Bool #

def should_ignore_device?(vendor_id : Int64, product_id : Int64) : Bool #

Predicate alias for #should_ignore_device


def start_joy_motion_sensors_calibration(device : Int64) : Void #

def start_joy_vibration(device : Int64, weak_magnitude : Float64, strong_magnitude : Float64, duration : Float64 = 0.0) : Void #

def stop_joy_motion_sensors_calibration(device : Int64) : Void #

def stop_joy_vibration(device : Int64) : Void #

def use_accumulated_input : Bool #

def use_accumulated_input=(enable : Bool) : Void #

def using_accumulated_input? : Bool #

Predicate alias for #is_using_accumulated_input


def vibrate_handheld(duration_ms : Int64 = 500_i64, amplitude : Float64 = -1.0) : Void #

def warp_mouse(position : Vector2) : Void #