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?

  • I was looking for the same thing, It's called "keystroke visualizer". Commented Dec 1, 2015 at 0:20

3 Answers 3


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.

  • no need in terminal. need octal/hex numbers. otherwise you don't know what is being sent.
    – safetyduck
    Commented Mar 2, 2019 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
    Commented Jun 20, 2020 at 2:18

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.

  • 5
    I tried Key Codes and it doesn't work for media keys.
    – Dan Mandle
    Commented Mar 11, 2015 at 22:20
  • This is exactly what I needed to debug a firmware of int'l keyboard.
    – epx
    Commented May 18, 2019 at 2:22
  • Let's try on macOS.
    – Smeterlink
    Commented May 20, 2020 at 23:21
  • As @epx highlights, this is very helpful for alternative keyboard layouts, including Dvorak. Commented Mar 27, 2022 at 14:16
  • For my CLoudnine C959 Egotkl gaming keyboard it doesn't show what I need to change. But it looks like no apps do. Commented Sep 7, 2022 at 20:25

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

  • 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
    Commented Mar 24, 2023 at 3:49
  • 1
    Update: Karabiner Elements only gives the last 10 or so keypresses. Can't use it for this.
    – Danyal
    Commented Mar 24, 2023 at 3:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .