Keystroke logging is the action of recording the keys entered via a keyboard and other similar input devices. Moreover, the users who enter keys are unaware that third party is monitoring their activities in a covert manner. Keylogging tools can be either hardware or software based. The attackers may record each key pressed, data copied to the clipboard, and screenshots taken by user.
The best remedies against keystroke logging will be not to click on doubtful links, installing anti-key-logger software, physical security, system patching, host-based IDS, and so on controls.