A hardware keylogger is an electronic device capable of capturing keystrokes from a PS/2 or USB keyboard.