W3cubDocs

/Godot 4.2

InputEventJoypadButton

Inherits: InputEvent < Resource < RefCounted < Object

Represents a gamepad button being pressed or released.

Description

Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see InputEventJoypadMotion.

Tutorials

Properties

JoyButton

button_index

0

bool

pressed

false

float

pressure

0.0

Property Descriptions

JoyButton button_index = 0

Button identifier. One of the JoyButton button constants.

bool pressed = false

  • void set_pressed ( bool value )
  • bool is_pressed ( )

If true, the button's state is pressed. If false, the button's state is released.

float pressure = 0.0

  • void set_pressure ( float value )
  • float get_pressure ( )

Represents the pressure the user puts on a pressure-sensitive button.

Deprecated. This property is never set by the engine and is always 0.

© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_inputeventjoypadbutton.html