0 votes
public override void _UnhandledKeyInput(InputEventKey @event)
{
    InputEventKey inputEventkey = @event;

    if ( inputEventkey.IsActionPressed("reload") )
    {
        GD.Print("Reload");
        reload = true;
    }

    if ( inputEventkey.IsActionPressed("mode") )
    {
        CycleMode();
    }

}

It's printing reload twice

any ideas?

EDIT: I found the problem. Turns out because my current scene is a child of a Viewport node and i tried to put this code in the viewport to enable object picking and this what causes it. But now i can't use object picking.

public override void _Input(InputEvent @event)
{
    UnhandledInput(@event);
}
Godot version 3.3.4
in Engine by (32 points)
edited by

1 Answer

0 votes

Broken mechanical key switch.
https://tesorotec.com/support/key-chattering/

by (846 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.