Keycastr
KeyCastr, an open-source keystroke visualizer
...On newer versions of macOS (10.15+) there is a new Input Monitoring menu under Security & Privacy within the System Preferences app, and KeyCastr will appear there automatically the first time you run it. Simply unlock this menu and check the box next to KeyCastr to enable it. On older versions of macOS, or if for some reason the app doesn't appear under the Input Monitoring menu (or if you want to pre-enable it) then you may manually add it to the list of apps in the Accessibility menu. If KeyCastr is already in the list, then click the, button and add KeyCastr again to be certain that the right application is chosen. ...