Keycastr
KeyCastr, an open-source keystroke visualizer
... 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. Make sure to check the "Display all keystrokes" checkbox if you would like to display more than just the modifier keys.