58

At the moment I'm trying to remote control my machine and command and ctrl do not seem to be working properly. Is there some type of 'keyboard sniffer' functionality so I can see exactly what is and is not being received?

3 Answers3

81

I don't know if the built-in keyboard viewer is sophisticated enough, but it should highlight pressed keys.

If you do not see those options, make sure it is checked off under your System Preferences > Keyboard

enter image description here

There are also apps like Keycastr that display bezel elements for pressed keys.

whaley
  • 199
Lri
  • 105,117
  • no need in terminal. need octal/hex numbers. otherwise you don't know what is being sent. – mathtick Mar 02 '19 at 12:51
  • 4
    In 10.15.5 this checkbox appears to be moved to Preferences -> Keyboard -> Input Sources -> "Show Input menu in menu bar" – mathandy Jun 20 '20 at 02:18
25

The application Key Codes from Many Tricks, available for free from the App Store, displays the key code, unicode value, and modifier keys state for any key combination pressed on your computer. If you need more extensive information than that provided by the Keyboard Viewer, you might find it helpful.

Daniel
  • 34,803
7

Karabiner Elements includes an Event Viewer that works really well. For example, Apple's Keyboard Viewer just ignores keypad keys; Karabiner-EventViewer shows them.

bronson
  • 239
  • I needed to log which keys are pressed during my daily usage so I know whether I really need a numpad or not. This was very useful for that. Although it does not directly give stats, it allows me to copy it to clipboard. I can then hopefully generate a summary using a program. Thanks. – Danyal Mar 24 '23 at 03:49
  • 1
    Update: Karabiner Elements only gives the last 10 or so keypresses. Can't use it for this. – Danyal Mar 24 '23 at 03:54