KeyCastr, an open-source keystroke visualizer.
brew cask install keycastrIn order to work, KeyCastr must be included in the list of applications with Accessibility API access, under the Security & Privacy system preferences.
To add KeyCastr to the list click the + button and select KeyCastr from the file system.