Input is an OS specific global singleton object created by the system when the game is loaded. It stores the input_map and (AFAIK) binds the system InputEvent(s) object so that it can track inputs from the system during the game loop. It is independent from any specific Node or Scene.
_input() is a node specific method which is fired only when an input is detected and does something. It can not for example keep track of whether a key or mouse button for example is being held down or (I assume) when it is released.
This is only my understanding so far,I hope it helps.
It can not for example keep track of whether a key or mouse button for example is being held down or (I assume) when it is released.
I’m not sure this is entirely accurate. event.is_action_pressed(..) has an optional bool for allow_echo, a method event.is_echo(), and there is also a method event.is_action_released(..).
Is there more information on how “Node specific method” vs “OS specific global singleton” which “is independent from any specific Node or Scene” could affect things?
batrocity | 2020-06-10 14:11
Just just want to point out, that it looks like allow_echo and is_echo are only for InputEventKey which are keyboard events. Not mouse or joypads.
So for example, you can’t have a joy button held down and press another joy button at the same time if you use _input(event), however it will with Input.