As far as I know, to do things like record keystrokes or interfere with the UI of other processes, an app on macOS has to be manually permitted through System Preferences -> Security & Privacy -> Privacy -> Accessibility.
Steam's in-game overlay feature and even some functions of the built-in Automator utility have to be allowed from there.
Steam's in-game overlay feature and even some functions of the built-in Automator utility have to be allowed from there.