Input listener question

Just started working on RPGMMV and after some code reviews i was not able to find a right way to register an event listener for a key in a map.
I saw a "tutorial" where the guy adds to an event.update function an alias to add there a check to his input, for example Input.isTriggered("ok") with an IF statement...
I really don't like that solution, is there a way to register a listener in a stack of listeners or something like that?
Are those arrow keys for example being listened from the registration of a map? Is it mandatory to loop on something?
Instead of looping on something i would preffer to add the listener directly on the document
Thanks for the help! I hope next time i would be able to help you too 🙂
Dunno if it is the right way, but will use the Game_Player :/

Original thread: https://forums.rpgmakerweb.com/threads/input-listener-question.82089/