AS you can see in https://github.com/nonunknown777/RedRobotEngine/blob/main/src/nodes/scene_tree.cpp#L122 I did a copy of original function to adapt for InputEvent class, but I know this can be done with templates, but in my test got errors