I never managed to solve this issue completely, but I managed to get it work, here’s how:
I created a custom event inside the class, that does the same things that a keypress event would do.
And then I plugged in all the instances of the class in the level blueprint to the custom event, like in the picture below.
It works, but there must be a better solution.