Skip to content

godot.InputEvent pressed property doesn't work, but is_pressed getter does #48

@MichaelBelousov

Description

@MichaelBelousov

Here's a reproduction:
ecmascript-pressed.zip

Here's the running script:

export default class A extends godot.Node2D {
  _input(evt) {
    if (evt.button_index === godot.ButtonList.BUTTON_RIGHT && evt.is_pressed())
      godot.print('right click!')
    if (evt.button_index === godot.ButtonList.BUTTON_LEFT && evt.pressed)
      godot.print('left click!')
  }
}

Notice that the right click triggers the print, but not the left.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions