How to detect whether keyboard/mouse or controller was interacted with last

Input Events can’t be used in Game Instance it seems (My bad). But the Player Controller can handle them: right click in the blueprint and type “input action” this should list you all the events you have set in the Project Settings.
EDIT: You can write C++ functions that handle the tracking itself. But I would definitely recommend calling the C++ functions inside the editor/blueprints, since you probably update the input mappings there.