Member-only story
Learning the basics of input actions (Godot 4/C#)
Let’s see how to make simple but powerful inputs for our Godot games!

Video games are a unique form of art because, among other things, they are an interactive medium. This means that a core feature of any game is handling user inputs, and reacting to the press of keys and buttons to trigger various actions in the game.
And, to do this, a very common technique is to use what we call input actions.
So, in this article, we’ll see why input actions are an interesting tool, how to create custom ones in a Godot project and how to use them in your C# code to trigger some specific actions on-screen.
Also, note that in this tutorial, I’ll be re-using the scene and player setup that we discussed in this previous episode of the series, with a little 2D avatar that can move horizontally or jump:

So be sure to check it out first if you haven’t seen it yet!
As usual, since we’ll be coding our logic in C#, make sure that you have a version of Godot with .NET enabled.

And of course, don’t forget that you can get the demo scene and all the assets from this demo on my Github 🚀 with all my other Godot tutorials.
The tutorial is also available as a video — text version is below:
But now, with all that said, let’s dive in and discover the basics of using input actions in Godot and C#!
So… why use input actions?
Before talking about the how, let’s first quickly discuss the why.