Karabiner-Elements provides a built-in event viewer named Karabiner-EventViewer. You can show keyboard and mouse events by using it. Open Karabiner-EventViewer from Launchpad. Input events will be shown when you type keyboard on EventViewer or press pointing buttons on Mouse Area.