But the print statement does not show; _input is never called. I read here in the forum that you need to call “set_process_input” in _init, but that did not help.
The node/script only has to exist in the scene tree, with the correct process mode. The default process mode (inherit) will work if your game is unpaused (which it will also be unpaused by default). You only need to call set_process_input(true) if you called set_process_input(false) before, it is enabled when the function is overriden, does not need to be manually enabled.
I am currently not at the computer that contains the project, but I can post the scene tree tomorrow. The scene contains only a sprite2d though; maybe it is because I attached the script with the _input function to the sprite?