Skip to main content
1 of 2

What are the available input names in Godot?

I have created a simple C++ "game" in godot. Lacking any good documentation, I based my work off examples on the internet, and for input I have this:

    const Input* i = Input::get_singleton();

    double delta_v = 0;
    if (i->is_action_pressed("ui_up"))
        delta_v += acceleration * delta;
    if (i->is_action_pressed("ui_down"))
        delta_v -= acceleration * delta;
    if (i->is_action_pressed("ui_left"))
        angular_velocity -= angular_acceleration * delta;
    if (i->is_action_pressed("ui_right"))
        angular_velocity += angular_acceleration * delta;

Based on that, I wanted to add a new action triggered by space. So I tried this:

    const Input* i = Input::get_singleton();
    if (i->is_action_pressed("ui_space"))
    {
        
    }

But I am getting an error:

The InputMap action "ui_space" doesn't exist. Did you mean "ui_text_backspace"?

Thing is, I cannot find any referrence to the correct names of input keys. I did find docs that contain enums for them, but that is no use for a method that expects a string.