How can I tell exactly what keys are being pressed on the Mac? 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 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



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