Your problem can be solved through applying the Observer Pattern.
You have Subjects like the keyboard key handlers, and you have Observers like the player character which need to react on events.
Every Observer can "subscribe" to one or more Subjects. This causes the Subject to add the Observer to an internal list. When something happens in the Subject, it calls a method on every Observer which subscribed to it. The Observer can then react on the event as it sees fit.
But as the others pointed out: Entities like enemies shouldn't react on user input directly - they should react on the behavior of the entity which is controlled by the player. The Observer pattern can also be used in that context, but there are also other patterns to consider (like using a Controller or just have each enemy check the state of the player in the game logic update loop).